mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 16:44:49 +01:00
Merge remote-tracking branch 'usgs-coupled/master'
This commit is contained in:
commit
a6e10bbb26
61
.github/workflows/cmake.yml
vendored
61
.github/workflows/cmake.yml
vendored
@ -114,6 +114,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
shared_libs: [OFF, ON]
|
||||
enable_module: [OFF, ON]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
@ -138,15 +140,15 @@ jobs:
|
||||
|
||||
- name: CMake configure
|
||||
if: runner.os == 'Linux'
|
||||
run: CC=clang CXX=clang++ cmake -B ${{ env.BUILD_DIR }} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
run: CC=clang CXX=clang++ cmake -B ${{ env.BUILD_DIR }} -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DIPHREEQC_ENABLE_MODULE=${{ matrix.enable_module }} -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
|
||||
- name: CMake configure
|
||||
if: runner.os == 'macOS'
|
||||
run: CC=$(brew --prefix llvm@15)/bin/clang CXX=$(brew --prefix llvm@15)/bin/clang++ cmake -B ${{ env.BUILD_DIR }} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
run: CC=$(brew --prefix llvm@15)/bin/clang CXX=$(brew --prefix llvm@15)/bin/clang++ cmake -B ${{ env.BUILD_DIR }} -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DIPHREEQC_ENABLE_MODULE=${{ matrix.enable_module }} -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
|
||||
- name: CMake configure
|
||||
if: runner.os == 'Windows'
|
||||
run: cmake -B ${{ env.BUILD_DIR }} -A x64 -T "ClangCL" -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
run: cmake -B ${{ env.BUILD_DIR }} -A x64 -T "ClangCL" -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DIPHREEQC_ENABLE_MODULE=${{ matrix.enable_module }} -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build ${{ env.BUILD_DIR }}
|
||||
@ -157,58 +159,7 @@ jobs:
|
||||
- name: Upload results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-${{ github.job }}-results
|
||||
path: ${{ github.workspace }}/${{ env.BUILD_DIR }}/Testing/
|
||||
|
||||
test-shared-clang:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
BUILD_DIR: _build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install ninja valgrind (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y ninja-build valgrind
|
||||
|
||||
- name: Install ninja (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: brew install ninja
|
||||
|
||||
- name: Set up Visual Studio shell (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: egor-tensin/vs-shell@v2
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: CMake configure
|
||||
if: runner.os == 'Linux'
|
||||
run: CC=clang CXX=clang++ cmake -B ${{ env.BUILD_DIR }} -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
|
||||
- name: CMake configure
|
||||
if: runner.os == 'macOS'
|
||||
run: CC=$(brew --prefix llvm@15)/bin/clang CXX=$(brew --prefix llvm@15)/bin/clang++ cmake -B ${{ env.BUILD_DIR }} -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
|
||||
- name: CMake configure
|
||||
if: runner.os == 'Windows'
|
||||
run: cmake -B ${{ env.BUILD_DIR }} -A x64 -T "ClangCL" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_STANDARD_REQUIRED=ON
|
||||
|
||||
- name: CMake build
|
||||
run: cmake --build ${{ env.BUILD_DIR }}
|
||||
|
||||
- name: CTest
|
||||
run: ctest --test-dir ${{ env.BUILD_DIR }}
|
||||
|
||||
- name: Upload results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}-${{ github.job }}-results
|
||||
name: ${{ matrix.os }}-${{ github.job }}-SHARED=${{ matrix.shared_libs }}-MODULE=${{ matrix.enable_module }}-results
|
||||
path: ${{ github.workspace }}/${{ env.BUILD_DIR }}/Testing/
|
||||
|
||||
chm:
|
||||
|
||||
@ -931,7 +931,7 @@ void IPhreeqc::SetBasicCallback(double (*fcn)(double x1, double x2, const char *
|
||||
this->PhreeqcPtr->register_basic_callback(fcn, cookie1);
|
||||
}
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
void IPhreeqc::SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, char *str, size_t l))
|
||||
void IPhreeqc::SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, const char *str, size_t l))
|
||||
{
|
||||
this->PhreeqcPtr->register_fortran_basic_callback(fcn);
|
||||
}
|
||||
|
||||
@ -1711,7 +1711,7 @@ Headings
|
||||
* @include ic
|
||||
*/
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str, size_t l));
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, const char *str, size_t l));
|
||||
#else
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, const char *str, int l));
|
||||
#endif
|
||||
|
||||
@ -718,7 +718,7 @@ public:
|
||||
* @see SetBasicCallback
|
||||
*/
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
void SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, char *str, size_t l));
|
||||
void SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, const char *str, size_t l));
|
||||
#else
|
||||
void SetBasicFortranCallback(double (*fcn)(double *x1, double *x2, const char *str, int l));
|
||||
#endif
|
||||
|
||||
@ -802,7 +802,7 @@ SetBasicCallback(int id, double (*fcn)(double x1, double x2, const char *str, vo
|
||||
#if !defined(R_SO)
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
IPQ_RESULT
|
||||
SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, char *str, size_t l))
|
||||
SetBasicFortranCallback(int id, double (*fcn)(double *x1, double *x2, const char *str, size_t l))
|
||||
{
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
|
||||
@ -414,7 +414,7 @@ RunStringF(int *id, char* input)
|
||||
}
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
IPQ_RESULT
|
||||
SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, char *str, size_t l))
|
||||
SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, const char *str, size_t l))
|
||||
{
|
||||
return ::SetBasicFortranCallback(*id, fcn);
|
||||
}
|
||||
|
||||
@ -133,7 +133,7 @@ extern "C" {
|
||||
IPQ_DLL_EXPORT int RunFileF(int *id, char* filename);
|
||||
IPQ_DLL_EXPORT int RunStringF(int *id, char* input);
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, char *str, size_t l));
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, const char *str, size_t l));
|
||||
#else
|
||||
IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, const char *str, int l));
|
||||
#endif
|
||||
|
||||
@ -208,7 +208,7 @@ IPQ_DLL_EXPORT int IPQ_DECL IPQ_CASE_UND(runstring, RUNSTRING, runstring_, RUNS
|
||||
{
|
||||
return RunStringF(id, input, len);
|
||||
}
|
||||
IPQ_DLL_EXPORT int IPQ_DECL IPQ_CASE_UND(setbasicfortrancallback, SETBASICFORTRANCALLBACK, setbasicfortrancallback_, SETBASICFORTRANCALLBACK_)(int *id, double (*fcn)(double *x1, double *x2, char *str, size_t l))
|
||||
IPQ_DLL_EXPORT int IPQ_DECL IPQ_CASE_UND(setbasicfortrancallback, SETBASICFORTRANCALLBACK, setbasicfortrancallback_, SETBASICFORTRANCALLBACK_)(int *id, double (*fcn)(double *x1, double *x2, const char *str, size_t l))
|
||||
{
|
||||
return SetBasicFortranCallbackF(id, fcn);
|
||||
}
|
||||
|
||||
@ -482,7 +482,7 @@ RunStringF(int *id, char* input, size_t input_length)
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, char *str, size_t l))
|
||||
SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, const char *str, size_t l))
|
||||
{
|
||||
return ::SetBasicFortranCallback(*id, fcn);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ extern "C" {
|
||||
int RunAccumulatedF(int *id);
|
||||
int RunFileF(int *id, char* filename, size_t filename_length);
|
||||
int RunStringF(int *id, char* input, size_t input_length);
|
||||
IPQ_RESULT SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, char *str, size_t l));
|
||||
IPQ_RESULT SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, const char *str, size_t l));
|
||||
IPQ_RESULT SetCurrentSelectedOutputUserNumberF(int *id, int *n);
|
||||
IPQ_RESULT SetDumpFileNameF(int *id, char* fname, size_t fname_length);
|
||||
IPQ_RESULT SetDumpFileOnF(int *id, int* dump_on);
|
||||
|
||||
@ -93,13 +93,13 @@ public:
|
||||
int basic_run(char* commands, void* lnbase, void* vbase, void* lpbase);
|
||||
void basic_free(void);
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
double basic_callback(double x1, double x2, char* str);
|
||||
double basic_callback(double x1, double x2, const char* str);
|
||||
#else
|
||||
double basic_callback(double x1, double x2, const char* str);
|
||||
#endif
|
||||
void register_basic_callback(double (*fcn)(double x1, double x2, const char* str, void* cookie), void* cookie1);
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, char* str, size_t l));
|
||||
void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, const char* str, size_t l));
|
||||
#else
|
||||
void register_fortran_basic_callback(double (*fcn)(double* x1, double* x2, const char* str, int l));
|
||||
#endif
|
||||
@ -1661,7 +1661,7 @@ protected:
|
||||
double (*basic_callback_ptr) (double x1, double x2, const char* str, void* cookie);
|
||||
void* basic_callback_cookie;
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
double (*basic_fortran_callback_ptr) (double* x1, double* x2, char* str, size_t l);
|
||||
double (*basic_fortran_callback_ptr) (double* x1, double* x2, const char* str, size_t l);
|
||||
#else
|
||||
double (*basic_fortran_callback_ptr) (double* x1, double* x2, const char* str, int l);
|
||||
#endif
|
||||
|
||||
@ -4242,7 +4242,7 @@ basic_callback(double x1, double x2, const char * str)
|
||||
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
double Phreeqc::
|
||||
basic_callback(double x1, double x2, char * str)
|
||||
basic_callback(double x1, double x2, const char * str)
|
||||
#else
|
||||
double Phreeqc::
|
||||
basic_callback(double x1, double x2, const char * str)
|
||||
@ -4253,7 +4253,7 @@ basic_callback(double x1, double x2, const char * str)
|
||||
|
||||
if (basic_callback_ptr != NULL)
|
||||
{
|
||||
return (*basic_callback_ptr) (x1, x2, (const char *) str, basic_callback_cookie);
|
||||
return (*basic_callback_ptr) (x1, x2, str, basic_callback_cookie);
|
||||
}
|
||||
if (basic_fortran_callback_ptr != NULL)
|
||||
{
|
||||
@ -4274,7 +4274,7 @@ Phreeqc::register_basic_callback(double (*fcn)(double x1, double x2, const char
|
||||
}
|
||||
#ifdef IPHREEQC_NO_FORTRAN_MODULE
|
||||
void
|
||||
Phreeqc::register_fortran_basic_callback(double ( *fcn)(double *x1, double *x2, char *str, size_t l))
|
||||
Phreeqc::register_fortran_basic_callback(double ( *fcn)(double *x1, double *x2, const char *str, size_t l))
|
||||
{
|
||||
this->basic_fortran_callback_ptr = fcn;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user