Are you using a generator that uses CMAKE_BUILD_TYPE and has it set to a known value? Build type doesn’t have to be set and multi-config generators don’t use it.
On Fri, Sep 27, 2019, at 4:18 PM, Zdenko Podobny wrote: > 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 > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake