[CMake] printing CMAKE_CXX_FLAGS_* based on build type
Zdenko Podobny
zdenop at gmail.com
Fri Sep 27 16:18:27 EDT 2019
Hello,
I try to print CMAKE_CXX_FLAGS_DEBUG/CMAKE_CXX_FLAGS_RELEASE as one line
statement but is does not work for me:
message( STATUS "CXX compiler ${CMAKE_BUILD_TYPE} build options:
${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}")
Produce empy result, but
message( STATUS "CXX compiler Release build options:
${CMAKE_CXX_FLAGS_RELEASE}")
works as expected.
Is it possible to do it in one line or I have to use if/elseif ?
Zdenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190927/8ab2ec0c/attachment.html>
More information about the CMake
mailing list