-
Notifications
You must be signed in to change notification settings - Fork 62
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_CXX_FLAGS are overwritten #316
Comments
As evidence of this problem see issue #338. Symbols were not exporting due to us overwriting flags in |
Obviously, I agree with Jacob. I might have below average CMAKE skills but, if the intent is to control/protect the flags being set to somehow reduce mistakes that objective is not being met. A few more "seasoned" CMAKE gurus also had eyes on my CMAKE configuration and did not see my "foul" of adding a flag and clobbering my request for symbols. It was not until the third person plainly told me that my binary had no symbols even though the file command reported that it was not stripped that it occurred to me that adding -fpermissive to kill the warnings that were promoted to errors regarding casting MIGHT have been the culprit. |
The documentation here: https://github.com/SCOREC/core/wiki/General-Build-instructions#configure describes that Clearly, this is not documented enough and there is not enough of a warning. Towards Jacob's point, this wrapper layer for flags maybe against modern CMake best practices. As Ken said, the main intent of
and towards longer term improvements, email the CMake mailing list to get opinions on the approach. edit: changed todo |
The problem isn't so much that it's not documented, but that overriding looking through bob.cmake I see almost no flags that we should be explicitly setting...
If we want to provide default flags for our developers like I can take responsibility for updating the CMake stuff, although I have a lot on my plate with trying to finish up my thesis, so it won't happen immediately. I'm also not familiar with what the XSDK folks require. |
Given that cmake has moved on since The other big feature bob.cmake provides is an export capability for creating I don't think there is a big rush in the short term on making these changes/improvements as most users have either kludged their way through problems or know what to do. If you can help after doing thesis work that would be much appreciated. Responses to the bob.cmake review items are below.
|
The
CMAKE_CXX_FLAGS
variable is overwritten bybob_begin_cxx_flags
. I see that the variablesSCOREC_CXX_FLAGS
andSCOREC_EXTRA_CXX_FLAGS
can be used instead.However, this behavior is not "standard" and I had to go into the
bob.cmake
file to figure out how to change the flags.I think it makes more sense to have the default behavior for
CMAKE_CXX_FLAGS
do whatSCOREC_EXTRA_CXX_FLAGS
currently does.If we don't want to go that route, then there needs to be some sort of documentation on how to set the cxx flags and a comment in the
CMakeLists.txt
The text was updated successfully, but these errors were encountered: