From b972cef8de1ec35278024699ca23b81c5abbdb1f Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Fri, 4 Oct 2024 07:09:37 -0700 Subject: [PATCH 1/3] Change one CI test to use ENABLE_DEV_BUILD, fix hacky methos in ENABLE_DEV_BUILD --- .gitlab/specs.yml | 2 +- cmake/spheral/SpheralAddLibs.cmake | 9 +-------- src/CMakeLists.txt | 13 +++---------- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/.gitlab/specs.yml b/.gitlab/specs.yml index 676b22488..7433b4c4a 100644 --- a/.gitlab/specs.yml +++ b/.gitlab/specs.yml @@ -9,7 +9,7 @@ .gcc_mvapich2: variables: SPEC: 'gcc@$GCC_VERSION^mvapich2' - EXTRA_CMAKE_ARGS: '-DENABLE_DOCS=On -DENABLE_WARNINGS_AS_ERRORS=On' + EXTRA_CMAKE_ARGS: '-DENABLE_DOCS=On -DENABLE_WARNINGS_AS_ERRORS=On -DENABLE_DEV_BUILD=On' .gcc_~mpi: variables: diff --git a/cmake/spheral/SpheralAddLibs.cmake b/cmake/spheral/SpheralAddLibs.cmake index 16d70d908..0012fbfba 100644 --- a/cmake/spheral/SpheralAddLibs.cmake +++ b/cmake/spheral/SpheralAddLibs.cmake @@ -224,14 +224,7 @@ function(spheral_add_pybind11_library package_name module_list_name) # Get the TPL dependencies get_property(SPHERAL_BLT_DEPENDS GLOBAL PROPERTY SPHERAL_BLT_DEPENDS) - # If building shared libraries, use the SPHERAL_OBJ_LIBS global list - # Note, LLNLSpheral has appended any local targets to this list as well - if(ENABLE_DEV_BUILD) - get_property(SPHERAL_DEPENDS GLOBAL PROPERTY SPHERAL_OBJ_LIBS) - else() - # Otherwise, provide target names - list(APPEND SPHERAL_DEPENDS Spheral_CXX ${${package_name}_DEPENDS}) - endif() + list(APPEND SPHERAL_DEPENDS Spheral_CXX ${${package_name}_DEPENDS}) set(MODULE_NAME Spheral${package_name}) PYB11Generator_add_module(${package_name} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2298e9393..791e7fadb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -83,12 +83,7 @@ endforeach() # For dev builds, we must call LLNLSpheralInstallObjs.cmake # to ensure LLNLSpheral libraries are added to the Spheral_CXX # target -if(ENABLE_DEV_BUILD) - # This calls LLNLSpheralInstallObjs.cmake - if(EXISTS ${EXTERNAL_SPHERAL_OBJ_CMAKE}) - include(${EXTERNAL_SPHERAL_OBJ_CMAKE}) - endif() -else() +if(NOT ENABLE_DEV_BUILD) set(CXX_sources spheralCXX.cc) endif() # Retrieve the global list populated in spheral_obj_add_library @@ -97,8 +92,6 @@ get_property(SPHERAL_OBJ_LIBS GLOBAL PROPERTY SPHERAL_OBJ_LIBS) spheral_add_cxx_library(CXX "${SPHERAL_OBJ_LIBS}") # This calls LLNLSpheralInstallObjs.cmake -if(NOT ENABLE_DEV_BUILD) - if(EXISTS ${EXTERNAL_SPHERAL_OBJ_CMAKE}) - include(${EXTERNAL_SPHERAL_OBJ_CMAKE}) - endif() +if(EXISTS ${EXTERNAL_SPHERAL_OBJ_CMAKE}) + include(${EXTERNAL_SPHERAL_OBJ_CMAKE}) endif() From b9d07bde11bbb94496f183bd460e53f04ce1939e Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 8 Oct 2024 08:52:47 -0700 Subject: [PATCH 2/3] Switched CI test for ENABLE_DEV_BUILD --- .gitlab/specs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/specs.yml b/.gitlab/specs.yml index 7433b4c4a..ce52eefb5 100644 --- a/.gitlab/specs.yml +++ b/.gitlab/specs.yml @@ -9,7 +9,7 @@ .gcc_mvapich2: variables: SPEC: 'gcc@$GCC_VERSION^mvapich2' - EXTRA_CMAKE_ARGS: '-DENABLE_DOCS=On -DENABLE_WARNINGS_AS_ERRORS=On -DENABLE_DEV_BUILD=On' + EXTRA_CMAKE_ARGS: '-DENABLE_DOCS=On -DENABLE_WARNINGS_AS_ERRORS=On' .gcc_~mpi: variables: @@ -23,7 +23,7 @@ .gcc_spectrum: variables: - SPEC: 'gcc@$GCC_VERSION^spectrum-mpi' + SPEC: 'gcc@$GCC_VERSION^spectrum-mpi -DENABLE_DEV_BUILD=On' .clang_mvapich2: variables: From 58ef57b9b644fcfb97695f6d351cd9ad88413cf7 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 8 Oct 2024 13:58:36 -0700 Subject: [PATCH 3/3] Fix bug in gitlab ci spec file --- .gitlab/specs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab/specs.yml b/.gitlab/specs.yml index ce52eefb5..64c6dce73 100644 --- a/.gitlab/specs.yml +++ b/.gitlab/specs.yml @@ -23,7 +23,8 @@ .gcc_spectrum: variables: - SPEC: 'gcc@$GCC_VERSION^spectrum-mpi -DENABLE_DEV_BUILD=On' + SPEC: 'gcc@$GCC_VERSION^spectrum-mpi' + EXTRA_CMAKE_ARGS: '-DENABLE_DEV_BUILD=On' .clang_mvapich2: variables: