You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmake_dependent_option just doesn't work like I always think it should so we should create our own called serac_project_specific_option that encapsulates the behavior we want.
For example:
ENABLE_BENCHMARKS is a global BLT created option, it is used for multiple projects. Allow a user to turn that on and honor it
Unless the project specific one is set SERAC_ENABLE_BENCHMARKS then honor that one.
Always create a SERAC_ENABLE_BENCHMARKS because the rest of our build system is guarded on that
The text was updated successfully, but these errors were encountered:
personally i like the way cmake_dependent_option works. pretty much, you can't set the project-specific option without ensuring the general one is true. so if you want to enable benchmarks, we should just set ENABLE_BENCHMARKS. it will automatically enable SERAC_ENABLE_BENCHMARKS.
from a discussion with @tupek2 : it would be nice to somehow set -DSMITH_ENABLE_BENCHMARKS=ON and only set that project's benchmarks... im not sure if that would work though, since we need to also set -DENABLE_BENCHMARKS=ON for BLT to setup benchmarking properly.
another thing to consider is these options need to be set properly before BLT is called, which would mean moving this call https://github.com/LLNL/serac/blob/develop/CMakeLists.txt#L127 which may complicate things in the case BLT changes/ adds options, we need to match BLT.
include(${BLT_SOURCE_DIR}/SetupBLT.cmake)
#------------------------------------------------------------------------------# Setup Macros/Basics#------------------------------------------------------------------------------include(${PROJECT_SOURCE_DIR}/cmake/SeracMacros.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/SeracBasics.cmake) # this would need to be called before setupBLTinclude(${PROJECT_SOURCE_DIR}/cmake/SeracCompilerFlags.cmake)
cmake_dependent_option
just doesn't work like I always think it should so we should create our own calledserac_project_specific_option
that encapsulates the behavior we want.For example:
ENABLE_BENCHMARKS
is a global BLT created option, it is used for multiple projects. Allow a user to turn that on and honor itSERAC_ENABLE_BENCHMARKS
then honor that one.SERAC_ENABLE_BENCHMARKS
because the rest of our build system is guarded on thatThe text was updated successfully, but these errors were encountered: