[CMake] Query build flags

Frank Hartmann soundart at gmx.net
Thu Jul 19 13:41:48 EDT 2012


Frank Hartmann <soundart at gmx.net> writes:
>
> I have tried today to make for every file ending with *.cpp
> (file(GLOB_RECURSE ...) a list of all flags used during compilation. I
> played on linux with get_property() on SOURCE, TARGET, DIRECTORY, GLOBAL
> level, used the properties COMPILE_DEFINITIONS and COMPILE_FLAGS and
> their _DEBUG and _RELEASE variants.
>
> As this did not match the observed flags using "VERBOSE=1 make" I added
> CMAKE_CXX_FLAGS and lots of other variables to my debug output. Still I
> failed to generate the full list of flags being used. 

Hi,

I have found now the last lines of Modules/Platform/Windows.cmake and
wrote today a script extracting the target, source file and used flags
for compilation out of a logfile of nmake/jom run. 

I think I run now the risk of cmd lines being silently truncated, but my
project was still quite happy:)







More information about the CMake mailing list