diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..8b38018d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,56 @@ +Dockerfile +#Git files +.git +.git-blame-ignore-revs +.github +.gitignore +#The remainder is based on .gitignore +**/config.h +**/CompileInfo.cpp +**/CMakeOptions.cpp +**/CMakeOptions.h +/src/carl/config.h +#Visual Studio files +*.[Oo]bj +*.user +*.aps +*.pch +*.vspscc +*.vssscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.[Cc]ache +*.ilk +*.log +*.lib +*.sbr +*.sdf +*.tlog +*.lastbuildstate +*.pdb +*.idb +*.opensdf +*.unsuccessfulbuild +ipch/ +obj/ +CMakeFiles/ +CPackConfig.cmake +# The build Dir +/*build*/ +build//CMakeLists.txt +/*.vcxproj +/*.filters +/*.sln +#Temp texteditor files +*.orig +*.*~ +nbproject/ +.DS_Store +.idea +.vscode +*.out diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index 7ca8ee5e..cfd9a871 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro: ["debian-11", "debian-12", "ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04"] + distro: ["debian-11", "debian-12", "ubuntu-20.04", "ubuntu-22.04", "ubuntu-24.04", "minimal_dependencies"] debugOrRelease: ["debug", "release"] steps: - name: Setup configuration diff --git a/.gitignore b/.gitignore index 44a34967..ed272183 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,49 @@ -**/*~ -**/*.pyc -.idea -.DS_Store -.vscode -build/** -nbproject/ -/resources/log4cplus-1.1.1/include/log4cplus/config/defines.hxx.cmake -/resources/log4cplus-1.1.1/include/log4cplus/config/defines.hxx **/config.h **/CompileInfo.cpp **/CMakeOptions.cpp **/CMakeOptions.h /src/carl/config.h -/src/carl/thom/todos -/src/carl/thom/todo +#Visual Studio files +*.[Oo]bj +*.user +*.aps +*.pch +*.vspscc +*.vssscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.[Cc]ache +*.ilk +*.log +*.lib +*.sbr +*.sdf +*.tlog +*.lastbuildstate +*.pdb +*.idb +*.opensdf +*.unsuccessfulbuild +ipch/ +obj/ +CMakeFiles/ +CPackConfig.cmake +# The build Dir +/*build*/ +build//CMakeLists.txt +/*.vcxproj +/*.filters +/*.sln +#Temp texteditor files +*.orig +*.*~ +nbproject/ +.DS_Store +.idea +.vscode +*.out diff --git a/CMakeLists.txt b/CMakeLists.txt index e94713c7..204df5de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,9 +105,6 @@ if(APPLE AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES arm64) message(STATUS "Detected that target system uses Apple Silicon.") message(WARNING "Compiling natively on Apple Silicon is experimental. Please report issues to support@stormchecker.org. For more information visit https://www.stormchecker.org/documentation/obtain-storm/apple-silicon.html") set(APPLE_SILICON 1) - message(WARNING "CLN and GiNaC are currently not supported on Apple Silicon-based architectures. Disabling usage of the libraries.") - set(USE_CLN_NUMBERS OFF) - set(USE_GINAC OFF) endif() foreach(p LIB BIN INCLUDE CMAKE) diff --git a/cmake/FindGINAC.cmake b/cmake/FindGINAC.cmake index f018e5d6..da6bae53 100644 --- a/cmake/FindGINAC.cmake +++ b/cmake/FindGINAC.cmake @@ -1,17 +1,20 @@ # Include dir find_path(GINAC_INCLUDE_DIR NAMES ginac.h + HINTS ${GINAC_PKGCONF_INCLUDE_DIRS} PATHS - /usr/include/ginac - /usr/local/include/ginac + /usr/include + /usr/local/include + PATH_SUFFIXES ginac DOC "Include directory for GiNaC" ) find_library(GINAC_LIBRARY NAMES ginac + HINTS ${GINAC_PKGCONF_LIBRARY_DIRS} PATHS - /usr/lib - /usr/local/lib + /usr/lib + /usr/local/lib ) if(GINAC_INCLUDE_DIR AND GINAC_LIBRARY) diff --git a/resources/cln.cmake b/resources/cln.cmake index cce13cee..72e1baed 100644 --- a/resources/cln.cmake +++ b/resources/cln.cmake @@ -1,17 +1,15 @@ -find_program(AUTORECONF autoreconf) -if(NOT AUTORECONF) - message(SEND_ERROR "Can not build cln, missing binary for autoreconf") -endif() - string(REPLACE "." "-" CLN_TAG ${CLN_VERSION}) ExternalProject_Add( - CLN-EP - GIT_REPOSITORY "git://www.ginac.de/cln.git" + CLN-EP + #URL https://www.ginac.de/CLN/cln-${CLN_VERSION}.tar.bz2 + GIT_REPOSITORY "git://www.ginac.de/cln.git" GIT_TAG "cln_${CLN_TAG}" - UPDATE_COMMAND "" - CONFIGURE_COMMAND cd && autoreconf -iv - COMMAND /configure --prefix= + DOWNLOAD_NO_PROGRESS 1 + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= + BUILD_COMMAND ${CMAKE_COMMAND} --build --config ${CMAKE_BUILD_TYPE} --target cln + LOG_INSTALL 1 + BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/libcln${DYNAMIC_EXT} ${INSTALL_DIR}/lib/libcln${STATIC_EXT} ) ExternalProject_Get_Property(CLN-EP INSTALL_DIR) @@ -22,5 +20,3 @@ add_imported_library(CLN STATIC "${INSTALL_DIR}/lib/libcln${STATIC_EXT}" "${INST add_dependencies(CLN_SHARED CLN-EP) add_dependencies(CLN_STATIC CLN-EP) add_dependencies(resources CLN_SHARED CLN_STATIC) - -mark_as_advanced(AUTORECONF) diff --git a/resources/eigen3.cmake b/resources/eigen3.cmake index f3cb49b8..90aa8c99 100644 --- a/resources/eigen3.cmake +++ b/resources/eigen3.cmake @@ -1,11 +1,8 @@ ExternalProject_Add( Eigen3-EP - GIT_REPOSITORY "https://github.com/eigenteam/eigen-git-mirror.git" + GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git GIT_TAG ${EIGEN3_VERSION} DOWNLOAD_NO_PROGRESS 1 - UPDATE_COMMAND "" # due to https://gitlab.kitware.com/cmake/cmake/issues/17229 - PATCH_COMMAND git cherry-pick eb592735746d935612caf658ab800e929c4ca6f4 - COMMAND git cherry-pick f65188960c52da20392d88296cbaeb341d635834 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= -DPKGCONFIG_INSTALL_DIR=/lib/pkgconfig LOG_INSTALL 1 ) diff --git a/resources/ginac.cmake b/resources/ginac.cmake index dae5107f..6b20a72c 100644 --- a/resources/ginac.cmake +++ b/resources/ginac.cmake @@ -1,26 +1,20 @@ -find_program(AUTORECONF autoreconf) -if(NOT AUTORECONF) - message(SEND_ERROR "Can not build GiNaC, missing binary for autoreconf") -endif() - -find_program(PYTHON2 python2) -if(NOT PYTHON2) - message(SEND_ERROR "Can not build GiNaC, missing binary for python2") +find_program(PYTHON3 python3) +if(NOT PYTHON3) + message(SEND_ERROR "Can not build GiNaC, missing binary for Python") endif() string(REPLACE "." "-" GINAC_TAG ${GINAC_VERSION}) ExternalProject_Add( - GiNaC-EP - GIT_REPOSITORY "git://www.ginac.de/ginac.git" + GiNaC-EP + #URL https://www.ginac.de/ginac-${GINAC_VERSION}.tar.bz2 + GIT_REPOSITORY "git://www.ginac.de/ginac.git" GIT_TAG "release_${GINAC_TAG}" DOWNLOAD_NO_PROGRESS 1 - UPDATE_COMMAND "" - CONFIGURE_COMMAND ${AUTORECONF} -iv - COMMAND /configure --quiet --prefix= PYTHON=${PYTHON2} PKG_CONFIG_PATH=/lib/pkgconfig/ - BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -C ginac - INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} -C ginac install + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX= + BUILD_COMMAND ${CMAKE_COMMAND} --build --config ${CMAKE_BUILD_TYPE} --target ginac LOG_INSTALL 1 + BUILD_BYPRODUCTS ${INSTALL_DIR}/lib/libginac${DYNAMIC_EXT} ${INSTALL_DIR}/lib/libginac${STATIC_EXT} ) ExternalProject_Get_Property(GiNaC-EP INSTALL_DIR) @@ -32,5 +26,3 @@ add_dependencies(GiNaC-EP CLN_SHARED CLN_STATIC) add_dependencies(GINAC_SHARED GiNaC-EP) add_dependencies(GINAC_STATIC GiNaC-EP) add_dependencies(resources GINAC_SHARED GINAC_STATIC) - -mark_as_advanced(AUTORECONF) diff --git a/resources/resources.cmake b/resources/resources.cmake index a457bcb0..fff4ae80 100644 --- a/resources/resources.cmake +++ b/resources/resources.cmake @@ -82,10 +82,8 @@ if(NOT FORCE_SHIPPED_RESOURCES) load_library(carl EIGEN3 3.3) endif() if(NOT EIGEN3_FOUND) - set(EIGEN3_VERSION "3.3.4") - set(EIGEN3_ZIPHASH "e337acc279874bc6a56da4d973a723fb") + set(EIGEN3_VERSION "3.4.0") include(resources/eigen3.cmake) - unset(EIGEN3_ZIPHASH) endif() print_resource_info("Eigen3" EIGEN3 ${EIGEN3_VERSION}) @@ -106,10 +104,14 @@ endif() ##### CLN if(USE_CLN_NUMBERS) if(NOT FORCE_SHIPPED_RESOURCES) - load_library(carl CLN 1.3) + if(APPLE_SILICON) + load_library(carl CLN 1.3.7) + else() + load_library(carl CLN 1.3) + endif() endif() if(NOT CLN_FOUND) - set(CLN_VERSION "1.3.4") + set(CLN_VERSION "1.3.7") include(resources/cln.cmake) endif() set_target_properties(CLN_STATIC PROPERTIES LINK_INTERFACE_LIBRARIES "GMP_STATIC") @@ -138,10 +140,10 @@ endif() ##### GiNaC if(USE_GINAC) if(NOT FORCE_SHIPPED_RESOURCES) - load_library(carl GINAC 1.6.2) + load_library(carl GINAC 1.7) endif() if(NOT GINAC_FOUND) - set(GINAC_VERSION "1.7.2") + set(GINAC_VERSION "1.8.7") include(resources/ginac.cmake) endif() print_resource_info("GiNaC" GINAC_SHARED ${GINAC_VERSION})