Skip to content

Commit 5dd6f94

Browse files
authored
Merge pull request #306 from LLNL/bugfix/correct_enable_dev_build
Fix ENABLE_DEV_BUILD
2 parents 7ad743c + 2e81837 commit 5dd6f94

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

.gitlab/specs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
.gcc_spectrum:
2525
variables:
2626
SPEC: 'gcc@$GCC_VERSION^spectrum-mpi'
27+
EXTRA_CMAKE_ARGS: '-DENABLE_DEV_BUILD=On'
2728

2829
.clang_mvapich2:
2930
variables:

cmake/spheral/SpheralAddLibs.cmake

+1-8
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,7 @@ function(spheral_add_pybind11_library package_name module_list_name)
224224

225225
# Get the TPL dependencies
226226
get_property(SPHERAL_BLT_DEPENDS GLOBAL PROPERTY SPHERAL_BLT_DEPENDS)
227-
# If building shared libraries, use the SPHERAL_OBJ_LIBS global list
228-
# Note, LLNLSpheral has appended any local targets to this list as well
229-
if(ENABLE_DEV_BUILD)
230-
get_property(SPHERAL_DEPENDS GLOBAL PROPERTY SPHERAL_OBJ_LIBS)
231-
else()
232-
# Otherwise, provide target names
233-
list(APPEND SPHERAL_DEPENDS Spheral_CXX ${${package_name}_DEPENDS})
234-
endif()
227+
list(APPEND SPHERAL_DEPENDS Spheral_CXX ${${package_name}_DEPENDS})
235228

236229
set(MODULE_NAME Spheral${package_name})
237230
PYB11Generator_add_module(${package_name}

src/CMakeLists.txt

+3-10
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,7 @@ endforeach()
8383
# For dev builds, we must call LLNLSpheralInstallObjs.cmake
8484
# to ensure LLNLSpheral libraries are added to the Spheral_CXX
8585
# target
86-
if(ENABLE_DEV_BUILD)
87-
# This calls LLNLSpheralInstallObjs.cmake
88-
if(EXISTS ${EXTERNAL_SPHERAL_OBJ_CMAKE})
89-
include(${EXTERNAL_SPHERAL_OBJ_CMAKE})
90-
endif()
91-
else()
86+
if(NOT ENABLE_DEV_BUILD)
9287
set(CXX_sources spheralCXX.cc)
9388
endif()
9489
# Retrieve the global list populated in spheral_obj_add_library
@@ -97,8 +92,6 @@ get_property(SPHERAL_OBJ_LIBS GLOBAL PROPERTY SPHERAL_OBJ_LIBS)
9792
spheral_add_cxx_library(CXX "${SPHERAL_OBJ_LIBS}")
9893

9994
# This calls LLNLSpheralInstallObjs.cmake
100-
if(NOT ENABLE_DEV_BUILD)
101-
if(EXISTS ${EXTERNAL_SPHERAL_OBJ_CMAKE})
102-
include(${EXTERNAL_SPHERAL_OBJ_CMAKE})
103-
endif()
95+
if(EXISTS ${EXTERNAL_SPHERAL_OBJ_CMAKE})
96+
include(${EXTERNAL_SPHERAL_OBJ_CMAKE})
10497
endif()

0 commit comments

Comments
 (0)