-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cleanup the cmake files #34
Conversation
detail/stl_interfaces/config.hpp | ||
detail/stl_interfaces/fwd.hpp | ||
detail/stl_interfaces/iterator_interface.hpp) | ||
${CMAKE_CURRENT_SOURCE_DIR}/iterator_interface.hpp |
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.
CMAKE_CURRENT_SOURCE_DIR is redundant for a FILE_SET. It's the root for the source for files in the set.
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.
OK
@@ -15,7 +15,7 @@ target_sources( | |||
PRIVATE FILE_SET beman_iterator_interface_tests_headers TYPE HEADERS) | |||
|
|||
target_link_libraries( | |||
beman.iterator_interface.tests PRIVATE beman::iterator_interface GTest::gtest | |||
beman.iterator_interface.tests PRIVATE beman::iterator_interface # XXX GTest::gtest |
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 tests have a direct dependency on gtest, not just on gtest main.
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.
GTest::main
links public to Test::getest
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.
Right, but if we changed the test main it would break the tests. This is the linking equivalent of Include What You Use; relying on transitive links of direct dependencies means surprising build breaks in the future.
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.
If you want, no problem.
@@ -14,16 +14,14 @@ | |||
"name": "_debug-base", | |||
"hidden": true, | |||
"cacheVariables": { | |||
"CMAKE_BUILD_TYPE": "Debug", | |||
"CMAKE_CXX_FLAGS": "-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined" | |||
"CMAKE_BUILD_TYPE": "Debug" |
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.
Is there a target that runs a sanitized build in the presets?
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.
No, but this preset does not work on APPLE!
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.
And attaching the sanitizer to the Debug build misses many of the things it is supposed to catch, in any case. And, in addition, specializing for the toolchain is what toolchain files are for, not the Presets.
OK. I wish it were otherwise, but I understand why the change is being requested.
CMakeLists.txt
Outdated
${PROJECT_BINARY_DIR}/include/beman/iterator_interface/config.hpp | ||
) | ||
|
||
# target_include_directories( |
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.
Delete before merging,
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.
done
Cleanup and format
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.
👍
Will merge in morning if there are no objections from anyone. |
Use FILE_SET HEADERS right