[CMake] Visual Studio: Inherited Project Property Sheets

2010-05-25 Thread Benoit Thomas
Hello, Is there a way to set the Inherited Project Property Sheets attribute with CMake when generating a Visual Studio project ? Thanks, -- Ben. ___ Powered by www.kitware.com Visit other Kitware open-source projects at

[CMake] Script Mode

2010-05-13 Thread Benoit Thomas
Hello, Is there any way to know if my code is running script mode (cmake -P) or normal mode ? I wanna do something like this: if (CMAKE_IS_RUNNING_IN_SCRIPT_MODE) # do some special stuff else() # do the normal stuff endif() Thank you, -- Ben.

Re: [CMake] addprefix macro?

2010-05-05 Thread Benoit Thomas
On 2010-05-05 10:22, Michael Wild wrote: # prefix and suffix elements foreach(l ${list_name}) list(APPEND ${list_name}_TMP ${prefix}${l}${suffix} ) endforeach() You also have an error in your foreach, it should be: foreach(l ${${list_name}}) -- Ben.

[CMake] Question about PARENT_SCOPE

2010-05-03 Thread Benoit Thomas
Hello, Is it possible to do something like this (sorry if there are typos): function (bar v scope) set (v 1 GRAND_PARENT_SCOPE) endfunction() function (foo v) bar (${v} PARENT_SCOPE) endfunction() foo (v) message (${v} == 1) If it's not possible, I'll go with global variables.

Re: [CMake] Question about PARENT_SCOPE

2010-05-03 Thread Benoit Thomas
On 2010-05-03 15:19, Alexander Neundorf wrote: On Monday 03 May 2010, Benoit Thomas wrote: function (foo v) bar (${v} PARENT_SCOPE) endfunction() You could have bar() use PARENT_SCOPE to set it in a variable in bar(), which could then itself set it to PARENT_SCOPE. Would

Re: [CMake] Question about PARENT_SCOPE

2010-05-03 Thread Benoit Thomas
On 2010-05-03 15:00, Clinton Stimpson wrote: On Monday 03 May 2010 12:42:58 pm Benoit Thomas wrote: Hello, Is it possible to do something like this (sorry if there are typos): function (bar v scope) set (v 1 GRAND_PARENT_SCOPE) endfunction() function (foo v) bar (${v

Re: [CMake] I'm confused with Find*.cmake and *-config.cmake

2010-04-20 Thread Benoit Thomas
On 2010-04-20 03:27, Michael Hertling wrote: On 04/19/2010 10:07 PM, Benoit Thomas wrote: I'm using an external library which is already compiled. I have wrapped the library in a MyLib.cmake and use it in cmake as an imported library. It works fine, but since the include line uses

[CMake] I'm confused with Find*.cmake and *-config.cmake

2010-04-19 Thread Benoit Thomas
Hello, I'm using an external library which is already compiled. I have wrapped the library in a MyLib.cmake and use it in cmake as an imported library. It works fine, but since the include line uses relative path, it changes from projects to projects and in some case it looks just wrong. I

Re: [CMake] target_link_libraries difficulties

2010-04-02 Thread Benoit Thomas
www.bluequartz.net Principal Software Engineer mike.jack...@bluequartz.net BlueQuartz Software Dayton, Ohio On Apr 1, 2010, at 2:52 PM, Benoit Thomas wrote: Hello, I'm trying to find a work around since target_link_libraries cannot be used per-configuration. I know

[CMake] target_link_libraries difficulties

2010-04-01 Thread Benoit Thomas
Hello, I'm trying to find a work around since target_link_libraries cannot be used per-configuration. I know that out-of-build could solve my problem, but my team is currently migrating from Visual Studio to cmake, so I need something which feel more like Visual Studio. My current project

Re: [CMake] project (name NONE) still search for a valid compiler

2010-03-30 Thread Benoit Thomas
-- Build files have been written to: /Users/davidcole/Desktop/xyz/build You are correct: using NONE in the project statement should (and does for me) prevent the compiler works testing. HTH, David On Tue, Mar 30, 2010 at 9:54 AM, Benoit Thomas benoit.tho...@gameloft.com mailto:benoit.tho

Re: [CMake] Bug ? Or I'm doing something wrong ?

2010-03-22 Thread Benoit Thomas
to disable it, or override this behavior. I hope this explain it better (I'm still new to cmake). Thank you, Ben. On 2010-03-22 04:52, David Cole wrote: On Fri, Mar 19, 2010 at 5:28 PM, Benoit Thomas benoit.tho...@gameloft.com mailto:benoit.tho...@gameloft.com wrote: Hello, I have

Re: [CMake] New CMake book ready for orders!

2010-03-22 Thread Benoit Thomas
Hello, I tried to order the book from Amazon but it still unavailable there; do you know when it will be possible to order it from Amazon ? Thanks, Ben. On 2010-03-19 13:53, Bill Hoffman wrote: Eric Noulard wrote: Is there really nothing you can to to lower the price of the shipping for

[CMake] Bug ? Or I'm doing something wrong ?

2010-03-19 Thread Benoit Thomas
Hello, I have the following directory structure root |--- project A |--- project B Project A B both have their cmakelists.txt file Root has a cmakelists.txt file which does add_subdirectory for project A and B When I generate the tree in visual studio, I have a solution

Re: [CMake] 2 questions :)

2010-03-11 Thread Benoit Thomas
Hi, Thanks for the answer, I'll use target_link_libraries for my dependency problem. For the multiple add_library, someone else had the same problem (and explain it better than I did), and his solution also worked for me :) Ben. On 2010-03-11 09:42, Matt McCormick wrote:

[CMake] link_directories include_directories

2010-03-10 Thread Benoit Thomas
Hello, Are there equivalent to link_directories include_directories which would require a target ? Thanks, Ben. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please

[CMake] 2 questions :)

2010-03-10 Thread Benoit Thomas
Hello, I have 3 projects, one library and 2 executables. Both executables depends on the library. The library is legacy stuff, and I don't need to fully convert it to cmake so the cmakelists. txt looks something like this: add_library(mylib STATIC IMPORTED) set_target_properties(mylib

[CMake] Question about add_library with IMPORTED

2010-03-09 Thread Benoit Thomas
Hello, I have a library which is a Visual Studio project only (which will be converted to cmake in the future). In my current cmake project, I try adding this library using the following code: set (IMPORTED_LOCATION ../farfaraway/lib) add_library (mylib STATIC IMPORTED) When I run cmake

Re: [CMake] Question about add_library with IMPORTED

2010-03-09 Thread Benoit Thomas
I knew I was missing something :) Thanks for the answers, work perfectly now ! Ben. On 2010-03-09 12:27, Benoit Thomas wrote: Hello, I have a library which is a Visual Studio project only (which will be converted to cmake in the future). In my current cmake project, I try adding

[CMake] Overwriting variables in cache.

2010-02-18 Thread Benoit Thomas
Hi, I am trying to overwrite some variables in the cache (without editing the cache); it works well for variables like CMAKE_CXX_FLAGS, but I cannot overwirte the CMAKE_CONFIGURATION_TYPES variable. Is there a way to do this without having to edit the cache ? (or modifying it the first time

[CMake] Is this possible ?

2010-02-18 Thread Benoit Thomas
Hi, I am trying to do something like this: function (FOO_DEBUG) ... endfunction (FOO_DEBUG) function (FOO_RELEASE) ... endfunction (FOO_RELEASE) foreach (CONFIG ${CMAKE_CONFIGURATION_TYPES}) FOO_${CONFIG} endforeach(CONFIG) But naturally, it doesn't work :( Is there a way to make

Re: [CMake] Is this possible ?

2010-02-18 Thread Benoit Thomas
This is perfect, Thank you ! On 2010-02-18 17:15, Tyler Roscoe wrote: On Thu, Feb 18, 2010 at 05:02:38PM -0500, Benoit Thomas wrote: I am trying to do something like this: function (FOO_DEBUG) ... endfunction (FOO_DEBUG) function (FOO_RELEASE) ... endfunction (FOO_RELEASE