[CMake] set_target_properties not setting COMPILE_DEFINITIONS?
Bill Hoffman
bill.hoffman at kitware.com
Tue Mar 29 10:02:12 EDT 2011
On 3/29/2011 9:49 AM, David Doria wrote:
>> You might want to try running cmake --trace and see if something odd is
>> happening when it is run.
>>
>> -Bill
>>
>
> Here is the output of the trace:
> http://pastebin.com/MfTcNHFE
>
> It looks like the definitions list is being created and applied to the
> target, does it not? (see the last 10 lines of that output).
>
> What I don't see in the trace is the other definitions that I DO see
> in the make VERBOSE output (like -D__WXGTK__). Where would these be
> added?
>
> David
>
Most likely coming from here:
/home/doriad/src/CMake/Modules/UsewxWidgets.cmake(72):
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS} )
Hmm, there is also this:
/home/doriad/src/CMake/Modules/UsewxWidgets.cmake(60):
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS
${wxWidgets_DEFINITIONS} )
I wonder if the directory properties are causing the trouble some how.
If you add a message to print out CMAKE_CXX_FLAGS you should see that
stuff. That should not affect the definitions... But, the directory
property might be the problem. You could try that in the small example.
-Bill
More information about the CMake
mailing list