Re: [CMake] #1f/#endif trouble...

2009-08-16 Thread Hendrik Sattler
Am Sonntag 16 August 2009 23:27:54 schrieb ML: > I have: > > #if TARGET_OS_MAC > typedef unsigned char > UInt8; > typedef signed char > SInt8; > typedef unsigned short

Re: [CMake] #1f/#endif trouble...

2009-08-16 Thread ML
Hi Mike, Yes, __APPLE__ is the preferred marker to decide if you are compiling on OS X. So was #if TARGET_OS_MAC OS 9? I know there are a lot of these and I dont care about OS 9 support any longer and I am already removing Metrowerks Support too. -Jason __

Re: [CMake] #1f/#endif trouble...

2009-08-16 Thread Mike Jackson
Yes, __APPLE__ is the preferred marker to decide if you are compiling on OS X. It is used in exactly the type of code that you presented. CMake, VTK, ITK, ParaView all use this construct. As far as I know Apple's GCC predefines it so you will not see it on the command line. I know it works because

[CMake] #1f/#endif trouble...

2009-08-16 Thread ML
Hi All, I am continuing my quest moving from XCode to CMake/Make This may be a Make specific question though. It would seem to me that #if TARGET_OS_MAC #endif is not getting executed in my code. I have: #if TARGET_OS_MAC typedef unsigned char

Re: [CMake] OBJECT_DEPENDS and target-level dependency.

2009-08-16 Thread Óscar Fuentes
Tyler Roscoe writes: > On Sun, Aug 16, 2009 at 09:18:31PM +0200, Óscar Fuentes wrote: >> No, that's right, although the best thing would be to create a >> dependency on the generated files of libParent instead of on libParent >> itself, but as the project is quite large, it doesn't impact paralle

Re: [CMake] compiler option for one source file?

2009-08-16 Thread j s
I apologize I found SET_SOURCE_FILES_PROPERTIES which has a non-pluralized analog of GET_SOURCE_FILE_PROPERTY. Juan On Sun, Aug 16, 2009 at 3:16 PM, j s wrote: > I have some warning messages I need to suppress from a generated source > file from flex. Is there a way to add a compiler flag for

[CMake] compiler option for one source file?

2009-08-16 Thread j s
I have some warning messages I need to suppress from a generated source file from flex. Is there a way to add a compiler flag for just one source file in a target? The specific flag I'd like to add for gcc is Wno-unused-function Which applies to static functions in the compilation unit. Juan __

Re: [CMake] A curiosity: cmake detects the wrong compiler when -g is used instead of -G

2009-08-16 Thread Tyler Roscoe
On Sun, Aug 16, 2009 at 09:27:50PM +0200, Óscar Fuentes wrote: > `cl' is *not* on the PATH. If I invoke it from the same command line the > shell says that there is no such executable. > > Please note the -g parameter instead of -G: > > D:\dev\idb-llvm\lp0\build\mingw\debug>cmake -g "MinGW Makefi

Re: [CMake] OBJECT_DEPENDS and target-level dependency.

2009-08-16 Thread Tyler Roscoe
On Sun, Aug 16, 2009 at 09:18:31PM +0200, Óscar Fuentes wrote: > No, that's right, although the best thing would be to create a > dependency on the generated files of libParent instead of on libParent > itself, but as the project is quite large, it doesn't impact parallel > builds too much. Ok now

[CMake] A curiosity: cmake detects the wrong compiler when -g is used instead of -G

2009-08-16 Thread Óscar Fuentes
This held me confused for 15 minutes or so. I'm on windows with Mingw's bin directory as the first item on PATH. `cl' is *not* on the PATH. If I invoke it from the same command line the shell says that there is no such executable. Please note the -g parameter instead of -G: D:\dev\idb-llvm\lp0\

Re: [CMake] OBJECT_DEPENDS and target-level dependency.

2009-08-16 Thread Óscar Fuentes
Tyler Roscoe writes: >> >> The source files of a library depend on generated files from another >> >> library on its parent directory. Let's call them libParent and libChild. >> >> >> >> For the source files on libChild I do >> >> >> >> SET_SOURCE_FILES_PROPERTIES(some_source.cpp >> >> PROP

Re: [CMake] OBJECT_DEPENDS and target-level dependency.

2009-08-16 Thread Tyler Roscoe
On Sun, Aug 16, 2009 at 07:31:28PM +0200, Óscar Fuentes wrote: > > On Sun, Aug 16, 2009 at 09:54:09AM +0200, Óscar Fuentes wrote: > >> The source files of a library depend on generated files from another > >> library on its parent directory. Let's call them libParent and libChild. > >> > >> For th

Re: [CMake] Create libtool file

2009-08-16 Thread Pau Garcia i Quiles
On Sun, Aug 16, 2009 at 6:05 PM, Hendrik Sattler wrote: > Am Dienstag 11 August 2009 19:26:57 schrieb Pau Garcia i Quiles: >> I'm converting to CMake a library ( >> http://sourceforge.net/projects/wvware/ ) which creates a libtool. >> While in this, I'm improving the CREATE_LIBTOOL_FILE macro ( >>

Re: [CMake] OBJECT_DEPENDS and target-level dependency.

2009-08-16 Thread Óscar Fuentes
Tyler Roscoe writes: > On Sun, Aug 16, 2009 at 09:54:09AM +0200, Óscar Fuentes wrote: >> The source files of a library depend on generated files from another >> library on its parent directory. Let's call them libParent and libChild. >> >> For the source files on libChild I do >> >> SET_SOURCE_

Re: [CMake] OBJECT_DEPENDS and target-level dependency.

2009-08-16 Thread Tyler Roscoe
On Sun, Aug 16, 2009 at 09:54:09AM +0200, Óscar Fuentes wrote: > The source files of a library depend on generated files from another > library on its parent directory. Let's call them libParent and libChild. > > For the source files on libChild I do > > SET_SOURCE_FILES_PROPERTIES(some_source.cp

Re: [CMake] Create libtool file

2009-08-16 Thread Hendrik Sattler
Am Dienstag 11 August 2009 19:26:57 schrieb Pau Garcia i Quiles: > I'm converting to CMake a library ( > http://sourceforge.net/projects/wvware/ ) which creates a libtool. > While in this, I'm improving the CREATE_LIBTOOL_FILE macro ( > http://www.cmake.org/Wiki/CMakeMacroLibtoolFile ). The next th

[CMake] OBJECT_DEPENDS and target-level dependency.

2009-08-16 Thread Óscar Fuentes
The source files of a library depend on generated files from another library on its parent directory. Let's call them libParent and libChild. For the source files on libChild I do SET_SOURCE_FILES_PROPERTIES(some_source.cpp PROPERTIES OBJECT_DEPENDS libParent) This way I try to delay the com