-
Notifications
You must be signed in to change notification settings - Fork 33
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
CMake changes for ASPECT DebugRelease mode #686
Conversation
We incorrectly always only built the debug version of an external GWB version 0.6 or newer if ASPECT was in DebugRelease mode. With GeodynamicWorldBuilder/WorldBuilder#686 we can now configure GWB twice inside the build directory of ASPECT and link to the correct library.
We incorrectly always only built the debug version of an external GWB version 0.6 or newer if ASPECT was in DebugRelease mode. With GeodynamicWorldBuilder/WorldBuilder#686 we can now configure GWB twice inside the build directory of ASPECT and link to the correct library.
We incorrectly always only built the debug version of an external GWB version 0.6 or newer if ASPECT was in DebugRelease mode. With GeodynamicWorldBuilder/WorldBuilder#686 we can now configure GWB twice inside the build directory of ASPECT and link to the correct library.
|
CMakeLists.txt
Outdated
@@ -528,7 +551,7 @@ if(MAKE_PYTHON_WRAPPER) | |||
endif() | |||
endif() | |||
|
|||
set_target_properties(${TARGET} PROPERTIES PREFIX "_" OUTPUT_NAME "gwb") | |||
set_target_properties(${WB_TARGET} PROPERTIES PREFIX "_" OUTPUT_NAME "gwb") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seem sot be tripping it up. Note that ${TARGET}
is not equal to WorldBuilder
but to either _gwb
or gwb
.
The main problem is that the c/cpp/fortran examples expect a library called libWorldBuilder.a, which with this change is no longer generated, but it instead generated _gwb.a
. Commenting out the line seems to let the testers pass on my system. I think this line may have been faulty an not executed.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #686 +/- ##
==========================================
+ Coverage 98.30% 98.31% +0.01%
==========================================
Files 107 107
Lines 7358 7358
==========================================
+ Hits 7233 7234 +1
+ Misses 125 124 -1 see 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
okay, seems to work now. Thank you, @MFraters . The script is somewhat messy, but I don't know of a better way to make this work within ASPECT. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this @tjhei! Although supporting DebugRelease in the future would be great, I don't think it needs to be done now.
I have two small comments on the new cmake variables, but otherwise it looks good to me.
CMakeLists.txt
Outdated
set(WB_ENABLE_APPS ON CACHE BOOL "If enabled, applications gwb-grid and gwb-dat are built.") | ||
set(WB_ENABLE_HELPER_TARGETS ON CACHE BOOL "If enabled, targets to indenting and switching to debug/release mode are configured.") | ||
set(WB_ENABLE_TESTS ON CACHE BOOL "If enabled, tests are configured.") | ||
set(WB_ENABLE_DOCUMENTATION ON CACHE BOOL "If enabled, building of the documentation is configured.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already an option called WB_BUILD_DOCUMENTATION
in doc/CMakeList.txt
. I am fine with removing that in favor of WB_ENABLE_DOCUMENTATION
, but that would need to be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the option I introduced also doesn't do anything. :-) removed.
@@ -40,6 +40,12 @@ ENDIF() | |||
|
|||
set (WORLD_BUILDER_SOURCE_DIR ${PROJECT_SOURCE_DIR}) | |||
|
|||
# define some config options: | |||
set(WB_ENABLE_APPS ON CACHE BOOL "If enabled, applications gwb-grid and gwb-dat are built.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The apps are used in the tester, so if this is off and the testers are on, it needs to only run the tests which do not require either gwb-grid or gwb-dat. Can you add a github tester which turns off the apps, but leaves the tester on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the test, please put it in test.yml and set needs: [test_indentation,coverage]
. If you want me to add the tester, let me know, I am happy to do it.
Ok, this should be good to go. Would you mind adding the additional CI step, @MFraters ? |
This PR adds a number of CMake options to rename the name of the gwb library and to disable certain targets/features. This change allows us to configure a debug and a release mode build of GWB when ASPECT is configured as DebugRelease mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will make a follow up pull request for that. Thanks for working on this!
This PR adds a number of CMake options to rename the name of the gwb library and to disable certain targets/features. This change allows us to configure a debug and a release mode build of GWB when ASPECT is configured as DebugRelease mode.
This PR should not change anything in the default configuration.