From 5c6c090322f2d565dd6edfe900901e4e11d9397b Mon Sep 17 00:00:00 2001 From: Wim Haeck Date: Tue, 23 Apr 2024 09:49:21 -0600 Subject: [PATCH] Updating dependencies --- CMakeLists.txt | 11 +++++++++-- cmake/develop_dependencies.cmake | 5 ++--- cmake/release_dependencies.cmake | 22 ++++++++-------------- cmake/unit_testing_python.cmake | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f824dd..7c17afc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,8 +33,11 @@ cmake_dependent_option( cmake_dependent_option( codex.python "Build codex python bindings" ON - "NOT ${subproject}" OFF + "NOT ${subproject} OR DEFINED require.codex.python " OFF ) +if ( codex.python ) + set( require.ENDFtk.python CACHE BOOL ON ) +endif() ######################################################################## # Dependencies @@ -99,6 +102,7 @@ if( codex.python ) ) target_link_libraries( codex.python PRIVATE codex ) + add_dependencies( codex.python ENDFtk.python ) target_include_directories( codex.python PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/python/src ) target_compile_options( codex.python PRIVATE "-fvisibility=hidden" ) set_target_properties( codex.python PROPERTIES OUTPUT_NAME codex ) @@ -108,8 +112,11 @@ if( codex.python ) message( STATUS "Building codex's python API" ) list( APPEND CODEX_PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR} ) + list( APPEND ENDFTK_PYTHONPATH ${CMAKE_CURRENT_BINARY_DIR}/_deps/endftk-build ) - include( cmake/unit_testing_python.cmake ) + if( codex.tests ) + include( cmake/unit_testing_python.cmake ) + endif() endif() diff --git a/cmake/develop_dependencies.cmake b/cmake/develop_dependencies.cmake index c34c9ba..9be00e0 100644 --- a/cmake/develop_dependencies.cmake +++ b/cmake/develop_dependencies.cmake @@ -7,16 +7,15 @@ include( FetchContent ) FetchContent_Declare( tools GIT_REPOSITORY https://github.com/njoy/tools - GIT_TAG v0.2.0 + GIT_TAG feature/python-views GIT_SHALLOW TRUE ) FetchContent_Declare( ENDFtk GIT_REPOSITORY https://github.com/njoy/ENDFtk.git - GIT_TAG feature/python-extension + GIT_TAG update/tools-dependency GIT_SHALLOW TRUE ) -set( ENDFtk.python CACHE INTERNAL BOOL ON ) FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2 diff --git a/cmake/release_dependencies.cmake b/cmake/release_dependencies.cmake index b778c41..c1178aa 100644 --- a/cmake/release_dependencies.cmake +++ b/cmake/release_dependencies.cmake @@ -5,21 +5,11 @@ include( FetchContent ) # Declare project dependencies ####################################################################### -FetchContent_Declare( catch-adapter - GIT_REPOSITORY https://github.com/njoy/catch-adapter - GIT_TAG fb84b82ebf7a4789aa43cea560680cf745c6ee4f - ) - FetchContent_Declare( Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2 GIT_TAG 3f0283de7a9c43200033da996ff9093be3ac84dc # tag: v3.3.2 ) -FetchContent_Declare( disco - GIT_REPOSITORY https://github.com/njoy/disco - GIT_TAG 2606933a854bb0269c4ec37143e1236797e27838 - ) - FetchContent_Declare( eigen GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git GIT_TAG d0bfdc1658ca0b4c659fd3702c351d2c2cdc876c # 3.4.1 branch on July 26, 2023 @@ -27,9 +17,13 @@ FetchContent_Declare( eigen FetchContent_Declare( ENDFtk GIT_REPOSITORY https://github.com/njoy/ENDFtk.git - GIT_TAG 0d3a1df1e7ddbf3ba9277badee4d4b538aadba0b + GIT_TAG d67492b23eae7f9fe9503fc6de89166f37202f49 + ) + +FetchContent_Declare( fast_float + GIT_REPOSITORY https://github.com/fastfloat/fast_float + GIT_TAG f476bc713fda06fbd34dc621b466745a574b3d4c # tag: v6.1.1 ) -set( ENDFtk.python CACHE INTERNAL BOOL ON ) FetchContent_Declare( pybind11 GIT_REPOSITORY https://github.com/pybind/pybind11 @@ -49,7 +43,7 @@ set( SPDLOG_BUILD_PIC CACHE INTERNAL BOOL ON ) FetchContent_Declare( tools GIT_REPOSITORY https://github.com/njoy/tools - GIT_TAG 25c9273d05601a9644feea6d7539250bf1d1c0dc # tag: v0.2.0 + GIT_TAG 14596b303de7413167f4f4c030e2923cabd3f2a3 ) ####################################################################### @@ -57,9 +51,9 @@ FetchContent_Declare( tools ####################################################################### FetchContent_MakeAvailable( - disco eigen ENDFtk + fast_float range-v3 spdlog tools diff --git a/cmake/unit_testing_python.cmake b/cmake/unit_testing_python.cmake index ef28b4d..721dbae 100644 --- a/cmake/unit_testing_python.cmake +++ b/cmake/unit_testing_python.cmake @@ -12,7 +12,7 @@ function( add_python_test name source ) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/python ) set_tests_properties( ${test_name} PROPERTIES ENVIRONMENT - PYTHONPATH=${CODEX_PYTHONPATH}:$ENV{PYTHONPATH}) + PYTHONPATH=${ENDFTK_PYTHONPATH}:${CODEX_PYTHONPATH}:$ENV{PYTHONPATH}) endfunction()