Re: [CMake] Sub dependencies?

2011-08-11 Thread Michael Wild
If the projects are independent, you might want to take a look at this Wiki page: http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file. HTH Michael ___ Powered by www.kitware.com Visit other Kitware open-source projects

Re: [CMake] append command

2011-08-11 Thread Michael Hertling
On 08/11/2011 10:04 PM, Alexander Neundorf wrote: > On Thursday 11 August 2011, Michael Hertling wrote: > ... >> Alternatively, one might consider to introduce a new, say, >> modifier "CONCAT" for the SET() command, e.g. >> >> SET( ... CONCAT [SEP ]) >> >> equivalent to >> >> SET( "${}...") > > I

Re: [CMake] append command

2011-08-11 Thread Michael Hertling
On 08/11/2011 08:37 PM, Michael Wild wrote: > On 08/11/2011 07:48 PM, Michael Hertling wrote: >> On 08/11/2011 05:20 PM, Michael Wild wrote: >>> On Thu 11 Aug 2011 04:46:44 PM CEST, David Cole wrote: On Thu, Aug 11, 2011 at 7:29 AM, Glenn Coombs >>> > wrote:

Re: [CMake] Sub dependencies?

2011-08-11 Thread Doug
In the vague hopes that using add_subdirectory() will magically fix things I've changed the structure to be along the lines of: exec/CMakeLists.txt exec/cmake/Modules/Findliba.cmake exec/deps/liba/CMakeLists.txt exec/deps/liba/cmake/Modules/Findlibb.cmake exec/deps/liba/deps/libb/CMakeLists.txt ex

Re: [CMake] Sub dependencies?

2011-08-11 Thread Doug
That works if it's all in a single project, but it's not. I totally understand you can do this: add_library(foo) target_link_library(foo bar) add_executable(exec) target_link_library(exec foo) If you have _this_ structure: .../liba/CMakeLists.txt .../blah/libb/CMakeLists.txt /so

Re: [CMake] append command

2011-08-11 Thread Alan W. Irwin
On 2011-08-11 17:35-0400 David Cole wrote: It's clear what you mean with the REGEX signatures, but I disagree about the optional nature of at least one input. In my experience, the lack of an input to one of these signatures usually means there's a typo in a dereferenced variable name, or the

Re: [CMake] append command

2011-08-11 Thread David Cole
On Thu, Aug 11, 2011 at 5:28 PM, Alan W. Irwin wrote: > On 2011-08-11 16:46-0400 David Cole wrote: > > I share Alex's confusion with your proposed signature. All other string >> subcommands refer to either "" or "" in their args >> list. None of them have both "" *and* "". >> > > Sorry I should h

Re: [CMake] append command

2011-08-11 Thread Alan W. Irwin
On 2011-08-11 16:46-0400 David Cole wrote: I share Alex's confusion with your proposed signature. All other string subcommands refer to either "" or "" in their args list. None of them have both "" *and* "". Sorry I should have been more explicit. The current signatures for REGEX et al are

Re: [CMake] append command

2011-08-11 Thread David Cole
On Thu, Aug 11, 2011 at 4:31 PM, Alan W. Irwin wrote: > On 2011-08-11 20:34+0200 Michael Wild wrote: > > On 08/11/2011 07:39 PM, Alan W. Irwin wrote: >> >>> On 2011-08-11 17:20+0200 Michael Wild wrote: >>> >>> How about string(APPEND " /newstuff" xyz) It is not satisfactory i

Re: [CMake] append command

2011-08-11 Thread Alan W. Irwin
On 2011-08-11 20:34+0200 Michael Wild wrote: On 08/11/2011 07:39 PM, Alan W. Irwin wrote: On 2011-08-11 17:20+0200 Michael Wild wrote: How about string(APPEND " /newstuff" xyz) It is not satisfactory in that it doesn't follow the semantics of all the other string(...) commands which never m

Re: [CMake] append command

2011-08-11 Thread Alexander Neundorf
On Thursday 11 August 2011, Michael Hertling wrote: ... > Alternatively, one might consider to introduce a new, say, > modifier "CONCAT" for the SET() command, e.g. > > SET( ... CONCAT [SEP ]) > > equivalent to > > SET( "${}...") I'm not sure this is actually necessary. Personally I'm fine wit

Re: [CMake] Is there a way to tell cmake to only care about certain targets?

2011-08-11 Thread cheshirekow
On Thu, 2011-08-11 at 13:42 -0400, cheshirekow wrote: > Is there a way to tell cmake to only care about the doc target? As in > don't fail when it can't find libraries required by other targets? > I've decided that I can accomplish what I want by putting the build commands for the actual outputs

Re: [CMake] append command

2011-08-11 Thread Michael Wild
On 08/11/2011 07:48 PM, Michael Hertling wrote: > On 08/11/2011 05:20 PM, Michael Wild wrote: >> On Thu 11 Aug 2011 04:46:44 PM CEST, David Cole wrote: >>> On Thu, Aug 11, 2011 at 7:29 AM, Glenn Coombs >> > wrote: >>> >>> The problem is that we currently already h

Re: [CMake] append command

2011-08-11 Thread Michael Wild
On 08/11/2011 07:39 PM, Alan W. Irwin wrote: > On 2011-08-11 17:20+0200 Michael Wild wrote: > >> How about >> >> string(APPEND " /newstuff" xyz) >> >> It is not satisfactory in that it doesn't follow the semantics of all >> the other string(...) commands which never modify their input. > > I like

Re: [CMake] append command

2011-08-11 Thread Michael Hertling
On 08/11/2011 05:20 PM, Michael Wild wrote: > On Thu 11 Aug 2011 04:46:44 PM CEST, David Cole wrote: >> On Thu, Aug 11, 2011 at 7:29 AM, Glenn Coombs > > wrote: >> >> The problem is that we currently already have 2 parallel systems. >> Some of the variables l

[CMake] Is there a way to tell cmake to only care about certain targets?

2011-08-11 Thread cheshirekow
I'm trying to automate generation of doxygen documentation for codes on a webserver. The webserver contains a working copy of the codes checked out from version control, and I'd like to script the process of going into each and running doxygen. The server that's running the site doesn't have all th

Re: [CMake] append command

2011-08-11 Thread Alan W. Irwin
On 2011-08-11 17:20+0200 Michael Wild wrote: How about string(APPEND " /newstuff" xyz) It is not satisfactory in that it doesn't follow the semantics of all the other string(...) commands which never modify their input. I like that idea, but I would generalize it as string(APPEND[...])

Re: [CMake] how to add additional linker options

2011-08-11 Thread Vinay Raj Hampapur
Thanks, that does the trick. /w alone suppresses all the warnings. Cheers, Vinay On Thu, Aug 11, 2011 at 3:35 AM, Glenn Coombs wrote: > Something like this: > > if (MSVC) > set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} > /FORCE:Multiply") > endif() > > in your top level CMakeLists

[CMake] hook __EOF__

2011-08-11 Thread t m
Hi All, Is it possible to register hook function that will be called at the end of processinf of CMakeLists.txt: Example CMakeLists.txt 0:cmake_minimum_required( VERSION 2.6 ) 1:project( foo.project) 2: 3: add_subdirectory( example ) 4: ... N: <-- last line of CMakeLists.txt this will trigger to

Re: [CMake] append command

2011-08-11 Thread Michael Wild
On Thu 11 Aug 2011 04:46:44 PM CEST, David Cole wrote: > On Thu, Aug 11, 2011 at 7:29 AM, Glenn Coombs > wrote: > > The problem is that we currently already have 2 parallel systems. > Some of the variables like CMAKE_EXE_LINKER_FLAGS are passed through >

Re: [CMake] append command

2011-08-11 Thread David Cole
On Thu, Aug 11, 2011 at 7:29 AM, Glenn Coombs wrote: > The problem is that we currently already have 2 parallel systems. Some of > the variables like CMAKE_EXE_LINKER_FLAGS are passed through as-is to the > compiler or linker. So, by definition, these variables are space separated > lists of opt

Re: [CMake] MinGW response file problem

2011-08-11 Thread Sascha Zelzer
Great! It worked with CMake 2.8.5. I was searching the net like crazy but did not land on the CMake 2.8.5 Changelog... Thanks, Sascha On 08/11/2011 01:35 PM, Bill Hoffman wrote: On 8/11/2011 5:06 AM, Sascha Zelzer wrote: Hi, I am using CMake 2.8.4 and MinGW (gcc 4.4.4, from the Qt SDK 1.1

Re: [CMake] Sub dependencies?

2011-08-11 Thread Glenn Coombs
The target_link_libraries() command would be in the CMakeLists.txt for library A, not the one for your executable. The one for your executable would just say target_link_libraries(myExe A). And cmake would automatically know that linking with A also means linking with png. You say that you have

Re: [CMake] Sub dependencies?

2011-08-11 Thread Doug
How can I achieve that _without_ editing my own cmake file? What if a swap in a different library for my executable that is abi compatible but uses a different implemented to load images? I'm not talking hypotheticals here: I literally have two versions of the library that use slightly different

[CMake] CMake and NaCl (Google NativeClient)

2011-08-11 Thread Nils Hjelte
Hello! I'm trying to port a C++ project to NaCl (http://code.google.com/chrome/nativeclient/), with cmake as the build system, and I need to figure out some things. I am using a Mac as build machine. I have changed the CMAKE_CXX_COMPILER/LINKER variables to use the nacl toolchain. What I would lik

Re: [CMake] Sub dependencies?

2011-08-11 Thread Glenn Coombs
Add the sub dependencies that library A has with target_link_libraries(): target_link_libraries(A png) -- Glenn On 11 August 2011 10:02, Doug wrote: > Hrm... this seems like something cmake should be able to do, but I don't > know how to make it work. > > If I have library A, that depends

Re: [CMake] MinGW response file problem

2011-08-11 Thread Bill Hoffman
On 8/11/2011 5:06 AM, Sascha Zelzer wrote: Hi, I am using CMake 2.8.4 and MinGW (gcc 4.4.4, from the Qt SDK 1.1.2) on a Windows 7 64bit system. For my project, I used the "MinGW Makefiles" CMake generator to configure it, but when issuing a "mingw32-make" in a cmd.exe window, I get compiler err

Re: [CMake] append command

2011-08-11 Thread Glenn Coombs
The problem is that we currently already have 2 parallel systems. Some of the variables like CMAKE_EXE_LINKER_FLAGS are passed through as-is to the compiler or linker. So, by definition, these variables are space separated lists of options. Attempting to use list(APPEND) on them adds semicolon c

Re: [CMake] how to add additional linker options

2011-08-11 Thread Glenn Coombs
Something like this: if (MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:Multiply") endif() in your top level CMakeLists.txt should do the trick. I think the /W0 flag will suppress any warnings. This would need to be added to CMAKE_C_FLAGS and/or CMAKE_CPP_FLAGS in a

Re: [CMake] Unable to locate boost_unit_test_framework-vc90-mt-gd-1_45.lib

2011-08-11 Thread Mathias Gaunard
On 08/10/2011 04:27 PM, Stephen Torri wrote: LNK1104: cannot open file 'boost_unit_test_framework-vc90-mt-gd-1_45.lib' I have boost installed in C:\boost. The FIND_BOOST macro able to find the installation headers and libraries I require. The only thing that is different is that the directory ha

[CMake] MinGW response file problem

2011-08-11 Thread Sascha Zelzer
Hi, I am using CMake 2.8.4 and MinGW (gcc 4.4.4, from the Qt SDK 1.1.2) on a Windows 7 64bit system. For my project, I used the "MinGW Makefiles" CMake generator to configure it, but when issuing a "mingw32-make" in a cmd.exe window, I get compiler errors due to corrupted command line argume

[CMake] Sub dependencies?

2011-08-11 Thread Doug
Hrm... this seems like something cmake should be able to do, but I don't know how to make it work. If I have library A, that depends on a library and an executable project that depends on library A, how can the executable project resolve the sub dependencies from A? Specifically libpng in my case

Re: [CMake] include directories,

2011-08-11 Thread Ɓukasz Tasz
Hi Michael, All Thanks a lot for your explanation, Now it's obvious for me why it behaves like that, include directories is inherited from directory properties, and this will be stable after processing cmakelists. What I want to do is a little bit different, I would like to reset value of INCLUDE

Re: [CMake] touch flag once all (target) sucess

2011-08-11 Thread Michael Wild
On Thu 11 Aug 2011 09:44:00 AM CEST, t m wrote: >> Hi All, >> >> I would like to touch flag file in the CMAKE_BINARY_DIR once the >> target all is executed with sucess. >> Since currently I'm not able to specify the dependency to this >> build-in target I do not have any hook to recognize if all su

Re: [CMake] touch flag once all (target) sucess

2011-08-11 Thread t m
> Hi All, > > I would like to touch flag file in the CMAKE_BINARY_DIR once the > target all is executed with sucess. > Since currently I'm not able to specify the dependency to this > build-in target I do not have any hook to recognize if all sucess and > to touch file. > > 1. Does anyone knows any