Skip to content
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

♻ Slightly refactor CMake to rely more on generator expressions #2

Merged
merged 2 commits into from
Feb 22, 2021
Merged

♻ Slightly refactor CMake to rely more on generator expressions #2

merged 2 commits into from
Feb 22, 2021

Conversation

bruxisma
Copy link
Contributor

Additional notes from the commit

  • ♻ Use target_compile_features instead of passing a flag directly
  • ♻ Check several compiler flags before using them
  • ♻ Include CTest instead of calling enable_testing() directly
  • ♻ Clean up creation of scratch target
  • 🔥 Delete erroneous include to pull in sol2-targets in ztd.text-config.cmake.in

There are several more changes that could be made to improve ztd.text, including setting up the install() command, removing the unnecessary exporting of CMake variables (this isn't needed since 2.8).

Additionally, CMake supports naming interface libraries with :: in them. As such creating an ALIAS library is unnecessary and the library could simply be named ztd::text

♻ Use target_compile_features instead of passing a flag directly
♻ Check several compiler flags before using them
♻ Include CTest instead of calling `enable_testing()` directly
♻ Clean up creation of `scratch` target
🔥 Delete erroneous `include` to pull in sol2-targets in ztd.text-config.cmake.in
CMP0092 Removes the default MSVC warning flags from
`CMAKE_<LANG>_FLAGS`, which allows us to remove the `string(REGEX
REPLACE)` call
@ThePhD ThePhD self-requested a review February 22, 2021 00:14
@ThePhD ThePhD self-assigned this Feb 22, 2021
@ThePhD ThePhD added the build Related (bug or feature) to the build system label Feb 22, 2021
Copy link
Contributor

@ThePhD ThePhD left a comment

Choose a reason for hiding this comment

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

Thanks for making it less garbage! 🎉

@ThePhD ThePhD merged commit 501bb29 into soasis:main Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related (bug or feature) to the build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants