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

2010-04-29 Thread Luke Dalessandro
On Thu, Apr 29, 2010 at 3:41 AM, Marcel Loose wrote: > Hi Luke, > > A little digging revealed that you should use the property DEFINITIONS > instead of COMPILE_DEFINITIONS, despite the fact that the manual says > that DEFINITIONS is there for backward compatibility only. Ahh, thanks so much. It f

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

2010-04-29 Thread Luke Dalessandro
On Thu, Apr 29, 2010 at 4:00 AM, Michael Wild wrote: > Considering that doing something like this: > > add_definitions(-m64) > > is not a very good idea since it is very compiler/platform specific, Right. I'm trying to make a minimally invasive change in the structure of an existing project that

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

2010-04-29 Thread Michael Wild
Considering that doing something like this: add_definitions(-m64) is not a very good idea since it is very compiler/platform specific, you might want to attack the whole problem from a different angle: if(CMAKE_COMPILER_IS_GNUC) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(_comp_flag -m64) else(

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

2010-04-29 Thread Marcel Loose
Hi Luke, A little digging revealed that you should use the property DEFINITIONS instead of COMPILE_DEFINITIONS, despite the fact that the manual says that DEFINITIONS is there for backward compatibility only. I noticed that that's the only property that contains your compile flag. Maybe someone fr

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

2010-04-28 Thread Luke Dalessandro
On Wed, Apr 28, 2010 at 12:04 PM, Marcel Loose 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

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

2010-04-28 Thread Marcel Loose
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. Best regards,

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

2010-04-28 Thread Luke Dalessandro
I meant add_definitions not dependencies. Sorry. Luke On Wed, Apr 28, 2010 at 11:39 AM, Luke Dalessandro 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 s

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

2010-04-28 Thread Luke Dalessandro
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