[CMake] CMAKE_C*_FLAGS undefined.

Óscar Fuentes ofv at wanadoo.es
Fri Apr 3 09:16:45 EDT 2009


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



More information about the CMake mailing list