I have this:

add_custom_command(OUTPUT ${LLVM_CONFIG}
  COMMAND echo "flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS}"
.... more stuff ....


When the custom command executes, this is the output:

flags:

i.e. the variables are empty, although I previously used add_definitions
to add flags and the makefile uses the optimization flags that
corresponds to the selected build type.

How can I access the effective values of the flags used when the
makefile is generated?

-- 
Oscar

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to