Skip to content

Conversation

@ClausKlein
Copy link
Contributor

Use FILE_SET HEADERS right

detail/stl_interfaces/config.hpp
detail/stl_interfaces/fwd.hpp
detail/stl_interfaces/iterator_interface.hpp)
${CMAKE_CURRENT_SOURCE_DIR}/iterator_interface.hpp
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK


target_link_libraries(
beman.iterator_interface.tests PRIVATE beman::iterator_interface GTest::gtest
beman.iterator_interface.tests PRIVATE beman::iterator_interface # XXX GTest::gtest
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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.

"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CXX_FLAGS": "-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined"
"CMAKE_BUILD_TYPE": "Debug"
Copy link
Member

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?

Copy link
Contributor Author

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!

Copy link
Member

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(
Copy link
Member

Choose a reason for hiding this comment

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

Delete before merging,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@steve-downey steve-downey left a comment

Choose a reason for hiding this comment

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

👍

@steve-downey
Copy link
Member

Will merge in morning if there are no objections from anyone.

@camio camio merged commit 81ded2c into bemanproject:main Jan 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants