Skip to content

[FIXUP] cmake: Enable CMP0141 policy after cmake_minimum_required()#245

Merged
hebasto merged 1 commit into
cmake-stagingfrom
240629-cmake-GL
Jun 29, 2024
Merged

[FIXUP] cmake: Enable CMP0141 policy after cmake_minimum_required()#245
hebasto merged 1 commit into
cmake-stagingfrom
240629-cmake-GL

Conversation

@hebasto
Copy link
Copy Markdown
Owner

@hebasto hebasto commented Jun 29, 2024

Otherwise, the policy setting won't get any effect.

See https://cmake.org/cmake/help/latest/policy/CMP0141.html


After #215, the CMAKE_MSVC_DEBUG_INFORMATION_FORMAT CMake's abstraction is not used in our code directly, but it is still convenient for the user to be able to use it when configuring the build system from the command line or an IDE.


This change can be easily verified on any system (not Windows only) by injecting the following commands:

cmake_policy(GET CMP0141 result)
message("${result}")

Otherwise, the policy setting won't get any effect.
@hebasto hebasto added the bug Something isn't working label Jun 29, 2024
@hebasto hebasto added this to the Ready for master milestone Jun 29, 2024
@m3dwards
Copy link
Copy Markdown

ACK af5e6b4

Slight adjustment needed for me to print result variable:

cmake_policy(GET CMP0141 result)
message("${result}")

@hebasto
Copy link
Copy Markdown
Owner Author

hebasto commented Jun 29, 2024

Slight adjustment needed for me to print result variable:

Sure! Thank you. A typo has been fixed.

@hebasto hebasto merged commit 8948ba8 into cmake-staging Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants