Re: [CMake] Generated source file dependencies

2009-05-13 Thread Denis Scherbakov
The problem is that when using visual studio, A might be built before B, and fails to build because B.h has not yet be generated. Did you try ADD_DEPENDENCIES(A B) ? I have TARGET_LINK_LIBRARIES(A B), so I think the library dependency is correctly handled. But there

Re: [CMake] Generated source file dependencies

2009-05-13 Thread Julien Michel
Denis Scherbakov a écrit : The problem is that when using visual studio, A might be built before B, and fails to build because B.h has not yet be generated. Did you try ADD_DEPENDENCIES(A B) ? I have TARGET_LINK_LIBRARIES(A B), so I think the library dependency is correctly handled.

Re: [CMake] Generated source file dependencies

2009-05-13 Thread Denis Scherbakov
Well at first glance it seemed to work, but in fact it is not : A is still built before B, and fails to build missing B.h. Please note that this only occurs on visual studio. Try to set B.h source file properties as GENERATED and include it into A_SRCS. Maybe this help. Could you

Re: [CMake] Generated source file dependencies

2009-05-13 Thread Julien Michel
Denis Scherbakov a écrit : Well at first glance it seemed to work, but in fact it is not : A is still built before B, and fails to build missing B.h. Please note that this only occurs on visual studio. Try to set B.h source file properties as GENERATED and include it into A_SRCS. Maybe

[CMake] include_directories per target

2009-05-13 Thread David . Karr
Olivier Delannoy olivier.delan...@gmail.com wrote: I would like to set include_directories on a per target basis. I understand that the INCLUDE_DIRECTORIES property is currently on a per folder basis. It is a bit of a problem as I would like to flatten my build and have all my targets

Re: [CMake] include_directories per target

2009-05-13 Thread John Drescher
On Wed, May 13, 2009 at 8:50 AM, david.k...@l-3com.com wrote: Olivier Delannoy olivier.delan...@gmail.com wrote: I would like to set include_directories on a per target basis. I understand that the INCLUDE_DIRECTORIES property is currently on a per folder basis. It is a bit of a problem as I

Re: [CMake] include_directories per target

2009-05-13 Thread Olivier Delannoy
I have probably wrongly explained my issue. I have my source code located in several folders based on the component / library they are part of. But I don't want to have recursive make so I don't want to have my project relying on add_subdirectory(). Thus all my target are located in the main

Re: [CMake] include_directories per target

2009-05-13 Thread Bill Hoffman
Olivier Delannoy wrote: I have probably wrongly explained my issue. I have my source code located in several folders based on the component / library they are part of. But I don't want to have recursive make so I don't want to have my project relying on add_subdirectory(). Thus all my target are

[CMake] Check if variable is already is cache

2009-05-13 Thread Marcel Loose
Hi all, I vaguely remember I read on this mailing list that it is possible to check whether a variable is already in cache. Something like this: if(CACHED var) ... endif(CACHED var) However, I cannot find anything about this in the manual. Is it possible, or does my memory serve me bad? Best

[CMake] CPack - Beta or Alpha version?

2009-05-13 Thread Brandon Olivares
Hi, I was looking at the list of CPack variables. There are variables to set the major, minor, and patch version numbers. But isn't there anything to set a beta or alpha number? For instance, what if I wanted a 1.0B1 version? Thanks, Brandon -- www.perpetualseeker.com Blog about college,

Re: [CMake] CPack - Beta or Alpha version?

2009-05-13 Thread Eric Noulard
2009/5/13 Brandon Olivares programmer2...@gmail.com: Hi, I was looking at the list of CPack variables. There are variables to set the major, minor, and patch version numbers. But isn't there anything to set a beta or alpha number? For instance, what if I wanted a 1.0B1 version?

Re: [CMake] Check if variable is already is cache

2009-05-13 Thread Alexander Neundorf
On Wednesday 13 May 2009, Marcel Loose wrote: Hi all, I vaguely remember I read on this mailing list that it is possible to check whether a variable is already in cache. Something like this: if(CACHED var) ... endif(CACHED var) However, I cannot find anything about this in the manual.

Re: [CMake] Static linking and find_library

2009-05-13 Thread S. Levent Yilmaz
On Mon, May 11, 2009 at 1:39 PM, Brad King brad.k...@kitware.com wrote: Bill Hoffman wrote: Marcel Loose wrote: 2) How can I persuade find_library() to only search for static libraries? You can't. Yes, you can: find_library(MATH_LIB NAMES libm.a) If you specify a valid library name

Re: [CMake] Static linking and find_library

2009-05-13 Thread Brad King
S. Levent Yilmaz wrote: How can one enforce static linkage on a per platform basis (not the whole project)? In other words, what setting can we insert into a toolchain file http://www.vtk.org/Wiki/CMake_Cross_Compiling to make this possible? Let me identify a problem here with find_library().

Re: [CMake] Static linking and find_library

2009-05-13 Thread Alexander Neundorf
On Wednesday 13 May 2009, Brad King wrote: S. Levent Yilmaz wrote: How can one enforce static linkage on a per platform basis (not the whole project)? In other words, what setting can we insert into a toolchain file http://www.vtk.org/Wiki/CMake_Cross_Compiling to make this possible?

Re: [CMake] Static linking and find_library

2009-05-13 Thread S. Levent Yilmaz
On Wed, May 13, 2009 at 4:09 PM, Brad King brad.k...@kitware.com wrote: S. Levent Yilmaz wrote: How can one enforce static linkage on a per platform basis (not the whole project)? In other words, what setting can we insert into a toolchain file http://www.vtk.org/Wiki/CMake_Cross_Compiling

Re: [CMake] Static linking and find_library

2009-05-13 Thread S. Levent Yilmaz
I don't think direct definition of CMAKE_SYSTEM_NAME is supported. It's supposed to be detected and set by the platform files. Only through a toolchain file should it be customized. (Alex?) Well, after all, it's just a cmake variable, so it can also be set from the command line.