diff --git a/CMakeLists.txt b/CMakeLists.txt index 12ecdc3fcd..a0a1555a4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,10 @@ # # Build AMICI library # -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.22) # When updating the policy version, please also update it in # src/CMakeLists.template.cmake -cmake_policy(VERSION 3.15...3.30) +cmake_policy(VERSION 3.22...3.30) project(amici) diff --git a/models/model_calvetti/CMakeLists.txt b/models/model_calvetti/CMakeLists.txt index 30262f7de3..c685278a4f 100644 --- a/models/model_calvetti/CMakeLists.txt +++ b/models/model_calvetti/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_calvetti) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_calvetti/model_calvetti.h b/models/model_calvetti/model_calvetti.h index c189ae8d74..bdc00bdac9 100644 --- a/models/model_calvetti/model_calvetti.h +++ b/models/model_calvetti/model_calvetti.h @@ -1,6 +1,6 @@ #ifndef _amici_model_calvetti_h #define _amici_model_calvetti_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -72,7 +72,7 @@ class Model_model_calvetti : public amici::Model_DAE { amici::Model* clone() const override { return new Model_model_calvetti(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype cj, const realtype *dx, const realtype *w, const realtype *dwdx) override { JSparse_model_calvetti(JSparse, t, x, p, k, h, cj, dx, w, dwdx); diff --git a/models/model_calvetti/swig/CMakeLists.txt b/models/model_calvetti/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_calvetti/swig/CMakeLists.txt +++ b/models/model_calvetti/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_dirac/CMakeLists.txt b/models/model_dirac/CMakeLists.txt index d96169b04a..8c07511c40 100644 --- a/models/model_dirac/CMakeLists.txt +++ b/models/model_dirac/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_dirac) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_dirac/model_dirac.h b/models/model_dirac/model_dirac.h index 0425320765..a8803237ca 100644 --- a/models/model_dirac/model_dirac.h +++ b/models/model_dirac/model_dirac.h @@ -1,6 +1,6 @@ #ifndef _amici_model_dirac_h #define _amici_model_dirac_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -72,7 +72,7 @@ class Model_model_dirac : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_dirac(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_dirac(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_dirac/swig/CMakeLists.txt b/models/model_dirac/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_dirac/swig/CMakeLists.txt +++ b/models/model_dirac/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_events/CMakeLists.txt b/models/model_events/CMakeLists.txt index 53e3a335b8..706de289cf 100644 --- a/models/model_events/CMakeLists.txt +++ b/models/model_events/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_events) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_events/model_events.h b/models/model_events/model_events.h index bc2b1b6157..bf68b4529a 100644 --- a/models/model_events/model_events.h +++ b/models/model_events/model_events.h @@ -1,6 +1,6 @@ #ifndef _amici_model_events_h #define _amici_model_events_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -86,7 +86,7 @@ class Model_model_events : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_events(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_events(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_events/swig/CMakeLists.txt b/models/model_events/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_events/swig/CMakeLists.txt +++ b/models/model_events/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_jakstat_adjoint/CMakeLists.txt b/models/model_jakstat_adjoint/CMakeLists.txt index 75cc527694..4407583796 100644 --- a/models/model_jakstat_adjoint/CMakeLists.txt +++ b/models/model_jakstat_adjoint/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_jakstat_adjoint) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_jakstat_adjoint/model_jakstat_adjoint.h b/models/model_jakstat_adjoint/model_jakstat_adjoint.h index aad482c26c..7d3b9290f4 100644 --- a/models/model_jakstat_adjoint/model_jakstat_adjoint.h +++ b/models/model_jakstat_adjoint/model_jakstat_adjoint.h @@ -1,6 +1,6 @@ #ifndef _amici_model_jakstat_adjoint_h #define _amici_model_jakstat_adjoint_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -75,7 +75,7 @@ class Model_model_jakstat_adjoint : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_jakstat_adjoint(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_jakstat_adjoint(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_jakstat_adjoint/swig/CMakeLists.txt b/models/model_jakstat_adjoint/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_jakstat_adjoint/swig/CMakeLists.txt +++ b/models/model_jakstat_adjoint/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_jakstat_adjoint_o2/CMakeLists.txt b/models/model_jakstat_adjoint_o2/CMakeLists.txt index 4b2b35e223..a8406acf6b 100644 --- a/models/model_jakstat_adjoint_o2/CMakeLists.txt +++ b/models/model_jakstat_adjoint_o2/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_jakstat_adjoint_o2) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h b/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h index e44c31b8d5..d7b34417b6 100644 --- a/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h +++ b/models/model_jakstat_adjoint_o2/model_jakstat_adjoint_o2.h @@ -1,6 +1,6 @@ #ifndef _amici_model_jakstat_adjoint_o2_h #define _amici_model_jakstat_adjoint_o2_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -75,7 +75,7 @@ class Model_model_jakstat_adjoint_o2 : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_jakstat_adjoint_o2(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_jakstat_adjoint_o2(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_jakstat_adjoint_o2/swig/CMakeLists.txt b/models/model_jakstat_adjoint_o2/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_jakstat_adjoint_o2/swig/CMakeLists.txt +++ b/models/model_jakstat_adjoint_o2/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_nested_events/CMakeLists.txt b/models/model_nested_events/CMakeLists.txt index c609531e1d..0dc2b916bb 100644 --- a/models/model_nested_events/CMakeLists.txt +++ b/models/model_nested_events/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_nested_events) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_nested_events/model_nested_events.h b/models/model_nested_events/model_nested_events.h index 5cad2049a9..0ca111adc7 100644 --- a/models/model_nested_events/model_nested_events.h +++ b/models/model_nested_events/model_nested_events.h @@ -1,6 +1,6 @@ #ifndef _amici_model_nested_events_h #define _amici_model_nested_events_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -75,7 +75,7 @@ class Model_model_nested_events : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_nested_events(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_nested_events(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_nested_events/swig/CMakeLists.txt b/models/model_nested_events/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_nested_events/swig/CMakeLists.txt +++ b/models/model_nested_events/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_neuron/CMakeLists.txt b/models/model_neuron/CMakeLists.txt index 4b580c036a..8de63e6084 100644 --- a/models/model_neuron/CMakeLists.txt +++ b/models/model_neuron/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_neuron) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_neuron/model_neuron.h b/models/model_neuron/model_neuron.h index 387a3cadbd..99fb505d60 100644 --- a/models/model_neuron/model_neuron.h +++ b/models/model_neuron/model_neuron.h @@ -1,6 +1,6 @@ #ifndef _amici_model_neuron_h #define _amici_model_neuron_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -89,7 +89,7 @@ class Model_model_neuron : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_neuron(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_neuron(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_neuron/swig/CMakeLists.txt b/models/model_neuron/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_neuron/swig/CMakeLists.txt +++ b/models/model_neuron/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_neuron_o2/CMakeLists.txt b/models/model_neuron_o2/CMakeLists.txt index 161fd4e9ce..1caad81d23 100644 --- a/models/model_neuron_o2/CMakeLists.txt +++ b/models/model_neuron_o2/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_neuron_o2) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_neuron_o2/model_neuron_o2.h b/models/model_neuron_o2/model_neuron_o2.h index 4ae613ee84..f29e1c88f3 100644 --- a/models/model_neuron_o2/model_neuron_o2.h +++ b/models/model_neuron_o2/model_neuron_o2.h @@ -1,6 +1,6 @@ #ifndef _amici_model_neuron_o2_h #define _amici_model_neuron_o2_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -91,7 +91,7 @@ class Model_model_neuron_o2 : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_neuron_o2(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_neuron_o2(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_neuron_o2/swig/CMakeLists.txt b/models/model_neuron_o2/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_neuron_o2/swig/CMakeLists.txt +++ b/models/model_neuron_o2/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_robertson/CMakeLists.txt b/models/model_robertson/CMakeLists.txt index 1a4c57353a..b9c6c2ecb1 100644 --- a/models/model_robertson/CMakeLists.txt +++ b/models/model_robertson/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_robertson) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_robertson/model_robertson.h b/models/model_robertson/model_robertson.h index 4f25f4d9bd..ef524b9239 100644 --- a/models/model_robertson/model_robertson.h +++ b/models/model_robertson/model_robertson.h @@ -1,6 +1,6 @@ #ifndef _amici_model_robertson_h #define _amici_model_robertson_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -73,7 +73,7 @@ class Model_model_robertson : public amici::Model_DAE { amici::Model* clone() const override { return new Model_model_robertson(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype cj, const realtype *dx, const realtype *w, const realtype *dwdx) override { JSparse_model_robertson(JSparse, t, x, p, k, h, cj, dx, w, dwdx); diff --git a/models/model_robertson/swig/CMakeLists.txt b/models/model_robertson/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_robertson/swig/CMakeLists.txt +++ b/models/model_robertson/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/models/model_steadystate/CMakeLists.txt b/models/model_steadystate/CMakeLists.txt index 3d0dacaf83..05d04f8081 100644 --- a/models/model_steadystate/CMakeLists.txt +++ b/models/model_steadystate/CMakeLists.txt @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.27) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(model_steadystate) @@ -38,6 +33,10 @@ endif() find_package(Amici REQUIRED HINTS ${CMAKE_CURRENT_LIST_DIR}/../../build) message(STATUS "Found AMICI ${Amici_DIR}") +set_target_properties(Upstream::amici PROPERTIES + MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo;Release; + MAP_IMPORTED_CONFIG_RELEASE Release + MAP_IMPORTED_CONFIG_DEBUG Debug;RelWithDebInfo;) # Debug build? if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") @@ -47,7 +46,6 @@ if("$ENV{ENABLE_AMICI_DEBUGGING}" OR "$ENV{ENABLE_GCOV_COVERAGE}") else() add_compile_options(-O0 -g) endif() - set(CMAKE_BUILD_TYPE "Debug") endif() # coverage options diff --git a/models/model_steadystate/model_steadystate.h b/models/model_steadystate/model_steadystate.h index ca02261ef8..a27a5a74df 100644 --- a/models/model_steadystate/model_steadystate.h +++ b/models/model_steadystate/model_steadystate.h @@ -1,6 +1,6 @@ #ifndef _amici_model_steadystate_h #define _amici_model_steadystate_h -/* Generated by amiwrap (R2017b) 8b324bca5b796a93094195d22a023e5f8e945ef1 */ +/* Generated by amiwrap (R2017b) d69c026f8f8a89a13f1fa1307548f2b8f7045fe1 */ #include #include #include "amici/defines.h" @@ -72,7 +72,7 @@ class Model_model_steadystate : public amici::Model_ODE { amici::Model* clone() const override { return new Model_model_steadystate(*this); }; - std::string getAmiciCommit() const override { return "8b324bca5b796a93094195d22a023e5f8e945ef1"; }; + std::string getAmiciCommit() const override { return "d69c026f8f8a89a13f1fa1307548f2b8f7045fe1"; }; void fJSparse(SUNMatrixContent_Sparse JSparse, const realtype t, const realtype *x, const realtype *p, const realtype *k, const realtype *h, const realtype *w, const realtype *dwdx) override { JSparse_model_steadystate(JSparse, t, x, p, k, h, w, dwdx); diff --git a/models/model_steadystate/swig/CMakeLists.txt b/models/model_steadystate/swig/CMakeLists.txt index eb9fe681c9..523571c52e 100644 --- a/models/model_steadystate/swig/CMakeLists.txt +++ b/models/model_steadystate/swig/CMakeLists.txt @@ -1,4 +1,15 @@ cmake_minimum_required(VERSION 3.15) +cmake_policy(VERSION 3.15...3.27) + +# cmake >=3.27 +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif(POLICY CMP0144) +# cmake >= 3.30 +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif(POLICY CMP0167) + if(DEFINED ENV{SWIG}) set(SWIG_EXECUTABLE $ENV{SWIG}) diff --git a/src/CMakeLists.template.cmake b/src/CMakeLists.template.cmake index acffe7e247..4ead82b79d 100644 --- a/src/CMakeLists.template.cmake +++ b/src/CMakeLists.template.cmake @@ -1,11 +1,6 @@ # Build AMICI model -cmake_minimum_required(VERSION 3.15) -cmake_policy(VERSION 3.15...3.30) - -# cmake >=3.27 -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif(POLICY CMP0144) +cmake_minimum_required(VERSION 3.22) +cmake_policy(VERSION 3.22...3.30) project(TPL_MODELNAME) diff --git a/tests/cpp/CMakeLists.txt b/tests/cpp/CMakeLists.txt index cf8ddece71..7d0096ae39 100644 --- a/tests/cpp/CMakeLists.txt +++ b/tests/cpp/CMakeLists.txt @@ -93,6 +93,7 @@ foreach(MODEL IN ITEMS ${TEST_MODELS}) TEST_COMMAND "" BUILD_ALWAYS 1 DEPENDS amici + CMAKE_ARGS "-DCMAKE_BUILD_TYPE=Debug" BUILD_BYPRODUCTS "${MODEL_LIBRARY}") # Rebuild if amici files are updated ExternalProject_Add_StepDependencies(external_model_${MODEL} build amici)