Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ENABLE_DEV_BUILD #306

Merged
merged 5 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab/specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move this to a different config, we build gcc_mvapich2 as our release build so testing for the dev build with it isn't ideal. Maybe clang_mavapich2, or gcc_spectrum?


.gcc_~mpi:
variables:
Expand Down
9 changes: 1 addition & 8 deletions cmake/spheral/SpheralAddLibs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
13 changes: 3 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()