Skip to content

Commit

Permalink
change cmake variable GEOS_BUILD_SHARED_LIBS to GEOS_BUILD_SHARED_COR…
Browse files Browse the repository at this point in the history
…E_LIB
  • Loading branch information
rrsettgast committed Aug 15, 2024
1 parent e915172 commit dbcfffc
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion host-configs/LLNL/lassen-base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
###############################################################################

set( GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" )
set( GEOS_BUILD_SHARED_CORE_LIB ON CACHE BOOL "" )
set( GEOS_BUILD_OBJ_LIBS OFF CACHE BOOL "" )
# Fortran
set(ENABLE_FORTRAN OFF CACHE BOOL "")
Expand Down
2 changes: 1 addition & 1 deletion host-configs/ORNL/frontier-base.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ set( ENABLE_DOCS OFF CACHE BOOL "" FORCE )
set( ENABLE_SCOTCH OFF CACHE BOOL "" FORCE )
set( ENABLE_SUPERLU_DIST OFF CACHE BOOL "" FORCE )

set( GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE )
set( GEOS_BUILD_SHARED_CORE_LIB ON CACHE BOOL "" FORCE )
set( GEOS_BUILD_OBJ_LIBS OFF CACHE BOOL "" FORCE )

set( CMAKE_CXX_STANDARD 17 CACHE STRING "" )
Expand Down
2 changes: 1 addition & 1 deletion host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ set(ENABLE_MATHPRESSO OFF CACHE BOOL "")
# Silo configure script doesn't recognize systype
set(SILO_BUILD_TYPE powerpc64-unknown-linux-gnu CACHE STRING "")

set(GEOS_BUILD_SHARED_LIBS OFF CACHE BOOL "")
set(GEOS_BUILD_SHARED_CORE_LIB OFF CACHE BOOL "")
set(ENABLE_PVTPackage ON CACHE BOOL "")

set(ENABLE_CALIPER ON CACHE BOOL "")
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if( ENABLE_HIP )
list( APPEND extraComponentsLinkList blt::hip )
endif()

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND extraComponentsLinkList geosx_core )
else()
list( APPEND extraComponentsLinkList ${geosx_core_libs} )
Expand Down
2 changes: 1 addition & 1 deletion src/cmake/GeosxOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ option( GEOS_INSTALL_SCHEMA "Enables schema generation and installation" ON )

option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" OFF )

option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " ON )
option( GEOS_BUILD_SHARED_CORE_LIB "Builds geosx_core as a shared library " ON )

set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" )
if( GEOS_PARALLEL_COMPILE_JOBS )
Expand Down
8 changes: 4 additions & 4 deletions src/coreComponents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ foreach( lib ${subdirs} )
endforeach()

# if we're building full static libs and not obj_libs
if( NOT GEOS_BUILD_SHARED_LIBS )
if( NOT GEOS_BUILD_SHARED_CORE_LIB )
set( geosx_core_list "" )
foreach( lib ${coreLibs} )
list( APPEND geosx_core_list ${GEOS_LINK_PREPEND_FLAG} ${lib} ${GEOS_LINK_POSTPEND_FLAG} )
Expand All @@ -69,22 +69,22 @@ foreach( lib ${subdirs} )
add_subdirectory( ${lib} )
endforeach()

if( GEOS_BUILD_SHARED_LIBS AND GEOS_BUILD_OBJ_LIBS )
if( GEOS_BUILD_SHARED_CORE_LIB AND GEOS_BUILD_OBJ_LIBS )
message( "Building shared geosx_core library with object coreComponents, executables link to geosx_core" )
blt_add_library ( NAME geosx_core
SOURCES dummy.cpp
DEPENDS_ON mainInterface physicsSolvers HDF5::HDF5
SHARED TRUE )

elseif( GEOS_BUILD_SHARED_LIBS AND NOT GEOS_BUILD_OBJ_LIBS )
elseif( GEOS_BUILD_SHARED_CORE_LIB AND NOT GEOS_BUILD_OBJ_LIBS )
message( "Building shared geosx_core library with static coreComponents, executables link to geosx_core" )
blt_combine_static_libraries( NAME geosx_core
SOURCE_LIBS ${coreLibs}
LIB_TYPE SHARED
LINK_PREPEND ${GEOS_LINK_PREPEND_FLAG}
LINK_POSTPEND ${GEOS_LINK_POSTPEND_FLAG} )

elseif( NOT GEOS_BUILD_SHARED_LIBS AND GEOS_BUILD_OBJ_LIBS )
elseif( NOT GEOS_BUILD_SHARED_CORE_LIB AND GEOS_BUILD_OBJ_LIBS )
message( "Building object coreComponents, executables link to coreComponents" )
else()
message( "Building static coreComponents, executables link to coreComponents" )
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/functions/unitTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set( gtest_geosx_tests

set( dependencyList ${parallelDeps} gtest functions )

# if ( GEOS_BUILD_SHARED_LIBS )
# if ( GEOS_BUILD_SHARED_CORE_LIB )
# list( APPEND dependencyList geosx_core )
# else()
# list( APPEND dependencyList ${geosx_core_libs} )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set( gtest_reactivefluid_xmls

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set( dataRepository_tests

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set( gtest_geosx_tests

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/unitTests/fileIOTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set( geosx_fileio_tests testHDFFile.cpp )

set( dependencyList ${parallelDeps} gtest HDF5::HDF5 )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core )
else()
list( APPEND dependencyList ${geosx_core_libs} )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set( gtest_geosx_tests

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set( gtest_geosx_tests

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set( nranks 2 )
# Add gtest C++ based tests
set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/unitTests/meshTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif()

set( dependencyList ${parallelDeps} gtest )

if( GEOS_BUILD_SHARED_LIBS )
if( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set( testingUtilities_sources
#
set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set( testSources

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set( gtest_geosx_tests

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/unitTests/wellsTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set( gtest_geosx_tests

set( dependencyList ${parallelDeps} gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core ${parallelDeps} HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} ${parallelDeps} HDF5::HDF5 )
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/unitTests/xmlTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set( multi_files
# Add gtest C++ based tests
set( dependencyList ${parallelDeps} gtest optionparser HDF5::HDF5 )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core HDF5::HDF5 )
else()
list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set( componentSources NewComponent.cpp )
unset( dependencyList )

# Specify dependencies
if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core)
else()
list( APPEND dependencyList ${geosx_core_libs} )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Specify list of tests
set( dependencyList gtest )

if ( GEOS_BUILD_SHARED_LIBS )
if ( GEOS_BUILD_SHARED_CORE_LIB )
list( APPEND dependencyList geosx_core )
else()
list( APPEND dependencyList ${geosx_core_libs} )
Expand Down

0 comments on commit dbcfffc

Please sign in to comment.