gnzlbg
gnzlbg

Reputation: 7415

CMake: how to get compiler "system" flags?

I'm trying to print using message all the compiler flags passed to my targets (they are the same for all targets). (Why? I need to pass them to cldoc to generate documentation using clang...).

Under MacOs I realize when doing make VERBOSE=1 that the following flags are passed to clang:

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9

What is the CMake variable that gives me these in a portable way?

Note: AFAIK they are not in: CMAKE_CXX_FLAGS, CMAKE_CXX_COMPILE_FLAGS, CMAKE_CXX_LINK_FLAGS, CMAKE_EXE_LINKER_FLAGS, CMAKE_CXX_FLAGS_RELEASE/DEBUG, CMAKE_C_FLAGS, CMAKE_C_COMPILE_FLAGS, CMAKE_C_LINK_FLAGS.

Upvotes: 0

Views: 414

Answers (1)

cs.Sync
cs.Sync

Reputation: 11

In my project I just use additional definition in my head CMakeList.txt with the "-v" command: add_definitions(-v)

Is similar to add VERBOSE=1 to the make command.

Upvotes: 1

Related Questions