[CMake] Where do add_dependencies() that are not defines go?

Luke Dalessandro ldalessandro at gmail.com
Wed Apr 28 12:58:53 EDT 2010


On Wed, Apr 28, 2010 at 12:04 PM, Marcel Loose <loose at astron.nl> wrote:
> Hi Luke,
>
> Remember that the definitions you do with add_definitions() are scoped;
> i.e. you can only see them in the directory where you defined them and
> its sub-directories, but not its parent directories.
>
> You should definitely do add_definitions("-m64") in your top-level
> directory.

I understand the scoping issue. The problem is that I don't know what
variable the non -D values are being placed in, so that I can recover
them in a custom build. They're not in any of the CMAKE_<LANG>_FLAGS,
nor are they in a file's COMPILE_FLAGS property. The -D values are
attached to the directory's COMPILE_DEFINITIONS, but the directory
doesn't have COMPILE_FLAGS.

They're not lost, because (say) -m64 does appear on the build line as
needed, I just don't know what variable they're being stored in.

Luke

>
> Best regards,
> Marcel Loose.
>
> On Wed, 2010-04-28 at 11:44 -0400, Luke Dalessandro wrote:
>> I meant add_definitions not dependencies. Sorry.
>>
>> Luke
>>
>> On Wed, Apr 28, 2010 at 11:39 AM, Luke Dalessandro
>> <ldalessandro at gmail.com> wrote:
>> > We sometimes use add_dependencies to add compile flags that aren't
>> > defines, e.g., -m64. I am trying to build an add_custom_command that
>> > needs access to these flags, but I can't seem to find them anywhere
> (I
>> > can get the dependencies from the directory properties).
>> >
>> > Does anyone know where these other flag types are stored?
>> >
>> > Thanks,
>> > Luke
>> >
>> _______________________________________________
>> 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
>
>
>


More information about the CMake mailing list