diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index c42f79d2e5..54b0c791ef 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -149,14 +149,17 @@ jobs: - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 + BUILD_SHARED_LIBS: ON - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces CMAKE_BUILD_TYPE: Debug DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + BUILD_SHARED_LIBS: ON - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + BUILD_SHARED_LIBS: ON - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release @@ -164,18 +167,21 @@ jobs: ENABLE_HYPRE: ON ENABLE_TRILINOS: OFF GCP_BUCKET: geosx/ubuntu22.04-gcc11 + BUILD_SHARED_LIBS: ON - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 ENABLE_HYPRE: ON ENABLE_TRILINOS: OFF + BUILD_SHARED_LIBS: ON - name: Ubuntu (22.04, clang 15.0.7, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu22.04-clang15 ENABLE_HYPRE: ON ENABLE_TRILINOS: OFF + BUILD_SHARED_LIBS: ON uses: ./.github/workflows/build_and_test.yml with: @@ -186,7 +192,6 @@ jobs: ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }} ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }} GCP_BUCKET: ${{ matrix.GCP_BUCKET }} - HOST_CONFIG: ${{ matrix.HOST_CONFIG }} RUNS_ON: ubuntu-22.04 secrets: inherit @@ -329,8 +334,6 @@ jobs: ENABLE_HYPRE_DEVICE: ${{ matrix.ENABLE_HYPRE_DEVICE }} ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }} ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }} - GCP_BUCKET: ${{ matrix.GCP_BUCKET }} - HOST_CONFIG: ${{ matrix.HOST_CONFIG }} NPROC: ${{ matrix.NPROC }} RUNS_ON: ${{ matrix.RUNS_ON }} REQUIRED_LABEL: "ci: run CUDA builds" diff --git a/host-configs/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index c9cf2efc8d..06635ad416 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -28,7 +28,7 @@ set( LAPACK_LIBRARIES ${HOMEBREW_DIR}/opt/lapack/lib/liblapack.dylib CACHE PATH set(ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE) set(ENABLE_MATHPRESSO OFF CACHE BOOL "" FORCE ) -set(GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index 684399ab11..50b5e3dadb 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -62,7 +62,19 @@ foreach( lib ${subdirs} ) endforeach() add_library(geosx_core INTERFACE) -target_link_libraries(geosx_core INTERFACE mainInterface ) +if( GEOS_BUILD_SHARED_LIBS) + target_link_libraries(geosx_core INTERFACE mainInterface ) +else() + get_target_property( libs geosx_core INTERFACE_LINK_LIBRARIES ) + + set( linkLibs "" ) + foreach( lib ${coreLibs} ) + list( APPEND linkLibs "$" ) + endforeach() + message( "linkLibs = ${linkLibs}" ) + target_link_libraries(geosx_core INTERFACE ${linkLibs} ) +endif() +blt_print_target_properties( TARGET geosx_core ) geosx_add_code_checks( PREFIX coreComponents EXCLUDES cmake constitutive/PVTPackage )