From b52486d6310ac281704f6aedfa8d14a511cd9a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-No=C3=ABl=20Grad?= Date: Tue, 17 Dec 2024 23:53:08 +0100 Subject: [PATCH] fixes --- .github/workflows/push_pull.yml | 5 ++--- CMakeLists.txt | 19 ++++++++++++++++--- doc/bibliography.bib | 1 + .../EspressoSystemStandAlone_test.cpp | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push_pull.yml b/.github/workflows/push_pull.yml index 7893f3a781..46851d5c33 100644 --- a/.github/workflows/push_pull.yml +++ b/.github/workflows/push_pull.yml @@ -28,10 +28,9 @@ jobs: - name: Build and check uses: ./.github/actions/build_and_check env: - build_procs: 4 - check_procs: 4 + build_procs: 3 + check_procs: 3 with_ccache: 'true' - with_fpe: 'true' debian: runs-on: ubuntu-latest diff --git a/CMakeLists.txt b/CMakeLists.txt index a03a4dfe61..ec120f7002 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,10 @@ espresso_option_enum( set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -Og -g") set(CMAKE_CXX_FLAGS_RELWITHASSERT "${CMAKE_CXX_FLAGS_RELWITHASSERT} -O3 -g") +# build targets as static libraries unless otherwise specified +set(ESPRESSO_BUILD_SHARED_LIBS_DEFAULT OFF) +set(BUILD_SHARED_LIBS ${ESPRESSO_BUILD_SHARED_LIBS_DEFAULT}) + # On Mac OS X, first look for other packages, then frameworks set(CMAKE_FIND_FRAMEWORK LAST) @@ -680,7 +684,9 @@ if(ESPRESSO_BUILD_WITH_WALBERLA) endif() set(WALBERLA_BUILD_WITH_FASTMATH off CACHE BOOL "") if(NOT walberla_POPULATED) + set(BUILD_SHARED_LIBS OFF) FetchContent_MakeAvailable(walberla) + set(BUILD_SHARED_LIBS ${ESPRESSO_BUILD_SHARED_LIBS_DEFAULT}) endif() set(WALBERLA_LIBS walberla::core walberla::domain_decomposition walberla::blockforest @@ -696,9 +702,15 @@ if(ESPRESSO_BUILD_WITH_WALBERLA) foreach(target_w_namespace IN LISTS WALBERLA_LIBS) string(REPLACE "walberla::" "" target_wo_namespace ${target_w_namespace}) add_library(${target_w_namespace} ALIAS ${target_wo_namespace}) - install(TARGETS ${target_wo_namespace} - LIBRARY DESTINATION ${ESPRESSO_INSTALL_PYTHON}/espressomd) + get_target_property(target_type ${target_wo_namespace} TYPE) + if(${target_type} STREQUAL "SHARED_LIBRARY") + install( + TARGETS ${target_wo_namespace} + LIBRARY DESTINATION ${ESPRESSO_INSTALL_PYTHON}/espressomd/_walberla) + endif() endforeach() + set(CMAKE_INSTALL_RPATH + "${CMAKE_INSTALL_RPATH}:${ESPRESSO_INSTALL_PYTHON}/espressomd/_walberla") if(ESPRESSO_BUILD_WITH_WALBERLA_AVX) function(espresso_avx_flags_callback COMPILER_AVX2_FLAG) target_compile_options( @@ -715,11 +727,12 @@ if(ESPRESSO_BUILD_WITH_CALIPER) set(CALIPER_WITH_MPI on CACHE BOOL "") set(CALIPER_WITH_NVTX off CACHE BOOL "") set(CALIPER_WITH_CUPTI off CACHE BOOL "") - set(CALIPER_BUILD_SHARED_LIBS on CACHE BOOL "") set(CALIPER_INSTALL_CONFIG off CACHE BOOL "") set(CALIPER_INSTALL_HEADERS off CACHE BOOL "") if(NOT caliper_POPULATED) + set(BUILD_SHARED_LIBS ON) FetchContent_MakeAvailable(caliper) + set(BUILD_SHARED_LIBS ${ESPRESSO_BUILD_SHARED_LIBS_DEFAULT}) endif() target_compile_options(caliper-common PRIVATE $<$:-Wno-restrict>) diff --git a/doc/bibliography.bib b/doc/bibliography.bib index 7254e40092..e1f5625de7 100644 --- a/doc/bibliography.bib +++ b/doc/bibliography.bib @@ -618,6 +618,7 @@ @TechReport{ISO-EIC-60559-2020 month = may, year = {2020}, edition = {2nd}, +institution = {Institute of Electrical and Electronics Engineers}, isbn = {978-1-5044-6641-7}, doi = {10.1109/IEEESTD.2020.9091348}, } diff --git a/src/core/unit_tests/EspressoSystemStandAlone_test.cpp b/src/core/unit_tests/EspressoSystemStandAlone_test.cpp index d7ef406464..2b6888b2e9 100644 --- a/src/core/unit_tests/EspressoSystemStandAlone_test.cpp +++ b/src/core/unit_tests/EspressoSystemStandAlone_test.cpp @@ -97,7 +97,7 @@ BOOST_FIXTURE_TEST_CASE(espresso_system_stand_alone, ParticleFactory) { auto const comm = boost::mpi::communicator(); auto const rank = comm.rank(); auto const n_nodes = comm.size(); -#if defined(FPE) and not defined(__APPLE__) +#if defined(FPE) auto const trap = fe_trap::make_unique_scoped(); #endif