Open JVApen opened 5 years ago
Thank you for reporting! I will try to reproduce this.
And I believe you mean this example: https://github.com/dev-cafe/cmake-cookbook/blob/master/chapter-07/recipe-03/c-cxx-example/set_compiler_flag.cmake
Which indeed sets a variable but does not modify global compiler flag variables since we wanted to give the caller the flexibility to set them per-target or project-wide.
Reading through the book, the function set_compiler_flag doesn't result in the expected behavior.
Expected Behavior
After calling set_compiler_flag, I would expect that compiler flag to be set.
Current Behavior
The function sets a status variable to indicate that the flag is valid.
Possible Solution
Rename to check_compiler_flag or find_valid_compiler_flag