Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Dec 17, 2024
1 parent 30b8696 commit b52486d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/push_pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 16 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -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 $<$<CXX_COMPILER_ID:GNU>:-Wno-restrict>)
Expand Down
1 change: 1 addition & 0 deletions doc/bibliography.bib
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/unit_tests/EspressoSystemStandAlone_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b52486d

Please sign in to comment.