[CMake] Dependency problem

2009-06-19 Thread pjtr hahn
Hello, I have a question concerning the order in that transitiv dependencies are resolved. My target depends on a source file. This source file is generated by an external tool by ADD_CUSTOM_COMMAND. To to ensure the file is always up to date I used ADD_CUSTOM_COMMAND with a phony target. Exampl

[CMake] dependency problem

2010-06-08 Thread Yifei Li
Hi folks, I'm new to cmake, can anyone help me with the following situation: I have a project which will generate following targets: 1) the application and a shared library, say MyLib. 2) some plugins(which are also shared libraries) that need to link MyLib, each plugin has its own cmakelists

Re: [CMake] Dependency problem

2009-06-19 Thread Tyler Roscoe
On Fri, Jun 19, 2009 at 06:10:16PM +0200, pjtr hahn wrote: > # generate source file > add_custom_command( OUTPUT __phony_target_name > COMMAND some_command_to_generate > ARGS -o __my_outfile.cpp > > ) Why don't you just do OUTPUT __my_outfile.cpp? That's what OUTPUT is for -- t

Re: [CMake] Dependency problem

2009-06-22 Thread pjtr hahn
2009/6/19 Tyler Roscoe : > On Fri, Jun 19, 2009 at 06:10:16PM +0200, pjtr hahn wrote: >> # generate source file >> add_custom_command( OUTPUT __phony_target_name >> COMMAND some_command_to_generate >> ARGS -o __my_outfile.cpp >> >> ) > > Why don't you just do OUTPUT __my_outfile

Re: [CMake] Dependency problem

2009-06-22 Thread Tyler Roscoe
On Mon, Jun 22, 2009 at 10:53:05AM +0200, pjtr hahn wrote: > I did not add __my_outfile.cpp to OUTPUT because I don't want it to > get recompiled at every build but just if it has been really > regenerated. > Therefor I made the custom command PHONY and made the PHONY target a > dependency of __my_

Re: [CMake] Dependency problem

2009-06-22 Thread pjtr hahn
2009/6/22 Tyler Roscoe : > Are you sure it doesn't Just Work if you do it the straightforward way? Yes I am. I tried all combinations. If I add the phony_name AND the *.cpp as OUTPUT it will compile on every run regardless if the .cpp has been touched by the command or not. If I only add the phony

Re: [CMake] Dependency problem

2009-06-22 Thread Alexander Neundorf
On Monday 22 June 2009, pjtr hahn wrote: > 2009/6/22 Tyler Roscoe : > > Are you sure it doesn't Just Work if you do it the straightforward way? > > Yes I am. I tried all combinations. > > If I add the phony_name AND the *.cpp as OUTPUT it will compile on > every run regardless if the .cpp has been

Re: [CMake] dependency problem

2010-06-08 Thread Torri, Stephen CIV NSWCDD, W15
> From: cmake-boun...@cmake.org on behalf of Yifei Li > Sent: Tue 6/8/2010 3:23 PM > To: cmake@cmake.org > Subject: [CMake] dependency problem > > Hi folks, > > I'm new to cmake, can anyone help me with the following situation: > > I have a project which

Re: [CMake] dependency problem

2010-06-08 Thread Yifei Li
es Yifei On Jun 8, 2010, at 3:57 PM, Torri, Stephen CIV NSWCDD, W15 wrote: >> From: cmake-boun...@cmake.org on behalf of Yifei Li >> Sent: Tue 6/8/2010 3:23 PM >> To: cmake@cmake.org >> Subject: [CMake] dependency problem >> >> Hi folks, >> >> I&

Re: [CMake] dependency problem

2010-06-08 Thread Torri, Stephen CIV NSWCDD, W15
> From: cmake-boun...@cmake.org on behalf of Yifei Li > Sent: Tue 6/8/2010 4:15 PM > To: cmake@cmake.org > Subject: Re: [CMake] dependency problem > > Thank you for reply. > > I already tried that. I think the problem was caused by 'find_library' in my >

Re: [CMake] dependency problem

2010-06-08 Thread Michael Hertling
On 06/08/2010 10:21 PM, Torri, Stephen CIV NSWCDD, W15 wrote: >> From: cmake-boun...@cmake.org on behalf of Yifei Li >> Sent: Tue 6/8/2010 4:15 PM >> To: cmake@cmake.org >> Subject: Re: [CMake] dependency problem >> >> Thank you for reply. >> >>

Re: [CMake] dependency problem

2010-06-08 Thread Yifei Li
, Torri, Stephen CIV NSWCDD, W15 wrote: > >>> From: cmake-boun...@cmake.org on behalf of Yifei Li >>> Sent: Tue 6/8/2010 4:15 PM >>> To: cmake@cmake.org >>> Subject: Re: [CMake] dependency problem >>> >>> Thank you for reply. >>> >&g

[CMake] dependency problem + POST_BUILD events

2007-07-25 Thread Sergei Riaguzov
Hi! I have a problem with POST_BUILD events. I have a target: add_library(blabla MODULE ${HDRS} ${SRCS} smth like that. Then lately I add a POST_BUILD event: add_custom_command(TARGET blabla POST_BUILD COMMAND ${7ZIP_BIN}/7z.exe a -tzip blablablabla ) so now I create a NMakefile and a Vis

Re: [CMake] dependency problem + POST_BUILD events

2007-07-25 Thread Brandon Van Every
On 7/25/07, Sergei Riaguzov <[EMAIL PROTECTED]> wrote: Can this be solved somehow? What I want is my POST_BUILD event zipping my DLL be called in case the DLL produced by add_library exists. You don't want a POST_BUILD event, you want 2 build rules. You want an ADD_CUSTOM_TARGET that zips up

Re: [CMake] dependency problem + POST_BUILD events

2007-07-30 Thread Sergei Riaguzov
On 7/25/07, Brandon Van Every <[EMAIL PROTECTED]> wrote: 2Brandon: sorry for private e-mails, I have pressed the wrong button, they should have gone here. My bad. > Can this be solved somehow? What I want is my POST_BUILD event zipping my > > DLL be called in case the DLL produced by add_library

Re: [CMake] dependency problem + POST_BUILD events

2007-07-30 Thread Brandon Van Every
On 7/30/07, Sergei Riaguzov <[EMAIL PROTECTED]> wrote: > Can I > change my 'all' target in NMakefile in such way that it depends on > 'pack_jars' from CMakeLists.txt? Sure. Just add ALL, as per the cmake.html docs. ADD_CUSTOM_TARGET: Add a target with no output so it will always be built. ADD

Re: [CMake] dependency problem + POST_BUILD events

2007-07-30 Thread Sergei Riaguzov
On 7/30/07, Brandon Van Every <[EMAIL PROTECTED]> wrote: > Can I > > change my 'all' target in NMakefile in such way that it depends on > > 'pack_jars' from CMakeLists.txt? > > Sure. Just add ALL, as per the cmake.html docs. It works! :) Thanx! ___ CM

[CMake] Dependency problem with 2.8.0 (but not 2.8.2+)

2011-05-17 Thread Raymond Wan
Hi all, I'm having a problem with cmake giving me an error about attempting to add a Boost library to a target. However, I have confirmed that my CMakeLists.txt works fine in 2.8.2 and 2.8.4; however, it doesn't work in 2.8.0. Unfortunately, I'm trying to get it work on a machine running on 2.8.