mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 04:48:23 +01:00
build: build one poet library
This commit is contained in:
parent
ca922dfa2a
commit
2914f59c13
@ -1,6 +1,4 @@
|
||||
add_subdirectory(DataStructures)
|
||||
|
||||
file(GLOB poet_lib_SRC
|
||||
file(GLOB_RECURSE poet_lib_SRC
|
||||
CONFIGURE_DEPENDS
|
||||
"*.cpp" "*.c")
|
||||
|
||||
@ -10,7 +8,15 @@ find_library(CRYPTO_LIBRARY crypto)
|
||||
add_library(poet_lib ${poet_lib_SRC})
|
||||
target_include_directories(poet_lib PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||
target_link_libraries(poet_lib PUBLIC
|
||||
MPI::MPI_CXX ${MATH_LIBRARY} RRuntime tug PhreeqcRM DataStructures ChemistryModule)
|
||||
MPI::MPI_CXX ${MATH_LIBRARY} RRuntime PhreeqcRM tug)
|
||||
|
||||
target_compile_definitions(poet_lib PUBLIC STRICT_R_HEADERS OMPI_SKIP_MPICXX)
|
||||
|
||||
add_subdirectory(ChemistryModule)
|
||||
mark_as_advanced(PHREEQCRM_BUILD_MPI PHREEQCRM_DISABLE_OPENMP)
|
||||
set(PHREEQCRM_DISABLE_OPENMP ON CACHE BOOL "" FORCE)
|
||||
|
||||
option(POET_DHT_DEBUG "Build with DHT debug info" OFF)
|
||||
|
||||
if(POET_DHT_DEBUG)
|
||||
target_compile_definitions(poet_lib PRIVATE DHT_STATISTICS)
|
||||
endif()
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
option(POET_USE_PRM_BACKEND "Use PhreeqcRM parallelization instead of poet's." OFF)
|
||||
option(POET_DHT_DEBUG "Build with DHT debug info" OFF)
|
||||
|
||||
list(APPEND CHEM_MODEL_SRC "ChemistryModule.cpp" )
|
||||
|
||||
mark_as_advanced(PHREEQCRM_BUILD_MPI PHREEQCRM_DISABLE_OPENMP)
|
||||
set(PHREEQCRM_DISABLE_OPENMP ON CACHE BOOL "" FORCE)
|
||||
|
||||
if(POET_USE_PRM_BACKEND)
|
||||
set(PHREEQCRM_BUILD_MPI ON CACHE BOOL "" FORCE)
|
||||
target_compile_definitions(poet_lib PRIVATE POET_USE_PRM)
|
||||
else()
|
||||
set(PHREEQCRM_BUILD_MPI OFF CACHE BOOL "" FORCE)
|
||||
list(APPEND CHEM_MODEL_SRC "WorkerFunctions.cpp" "MasterFunctions.cpp" "DHT.c" "DHT_Wrapper.cpp" "HashFunctions.cpp")
|
||||
endif()
|
||||
|
||||
add_library(ChemistryModule ${CHEM_MODEL_SRC})
|
||||
target_include_directories(ChemistryModule PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||
target_link_libraries(ChemistryModule
|
||||
PUBLIC MPI::MPI_CXX PhreeqcRM
|
||||
PRIVATE ${MATH_LIBRARY}
|
||||
)
|
||||
|
||||
target_compile_definitions(ChemistryModule PUBLIC OMPI_SKIP_MPICXX)
|
||||
|
||||
if(POET_DHT_DEBUG)
|
||||
target_compile_definitions(ChemistryModule PRIVATE DHT_STATISTICS)
|
||||
endif()
|
||||
|
||||
if(POET_USE_PRM_BACKEND)
|
||||
target_compile_definitions(ChemistryModule PUBLIC POET_USE_PRM)
|
||||
endif()
|
||||
@ -1,6 +0,0 @@
|
||||
file(GLOB DataStructures_SRC
|
||||
CONFIGURE_DEPENDS
|
||||
"*.cpp" "*.c")
|
||||
|
||||
add_library(DataStructures ${DataStructures_SRC})
|
||||
target_include_directories(DataStructures PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||
Loading…
x
Reference in New Issue
Block a user