Re: [CMake] Handling library interdependencies

2009-06-16 Thread Michael Wild
On 17. Jun, 2009, at 1:22, Mark Lohry wrote: Thanks for the reply. I added "add_dependencies( lib1 lib2 )", "add_dependencies( lib2 lib1 )", and "add_dependencies( execthing lib1 lib2 )" in their appropriate places, and changed the libraries to STATIC, but no change. First off, you're c

Re: [CMake] Creating a dynamic library with a static library hidden inside

2009-06-16 Thread Michael Leong
Thanks for the reply, Andreas. > > > > > > > > 2: The dynamic library's internal openssl functions should not be > > > > externally visible. > > > > > > Not sure if this is possible. If the symbols are in there, someone with > > > dumpbin or some other tool will probably be able to find the

Re: [CMake] CMake generating wrong MSVC flags for static libraries?

2009-06-16 Thread John Drescher
> It appears that CMake is, by default, generating Makefiles that build > static libraries with the /MD (or /MDd) flag.  Can anyone please verify > that? Yes it does that for me. > >  If so, shouldn't CMake be using the /MT (or /MTd) flag when > building static libraries?  Is this a known issue?

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Clinton Stimpson
Tyler Roscoe wrote: On Tue, Jun 16, 2009 at 07:19:52PM -0400, Michael Jackson wrote: myApp: project(myApp) add_subdirectory(commonLib) add_subdirectory(lib1) add_subdirectory(lib2) add_executable(myApp ${files}) target_link_libraries(myApp lib1 lib2) lib1/lib2: project(lib1) add_librar

Re: [CMake] Handling library interdependencies

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 06:23:46PM -0500, Mark Lohry wrote: > Correct, it fails when linking the executables with the libraries. So it's execthing that has the symbol errors? What does the link command line look like? Are all the paths and library names correct? Again, your approach seems sounds

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 07:19:52PM -0400, Michael Jackson wrote: > myApp: > > project(myApp) > > add_subdirectory(commonLib) > add_subdirectory(lib1) > add_subdirectory(lib2) > > add_executable(myApp ${files}) > target_link_libraries(myApp lib1 lib2) > > > lib1/lib2: > > project(lib1) > > ad

Re: [CMake] Handling library interdependencies

2009-06-16 Thread Mark Lohry
Correct, it fails when linking the executables with the libraries. On Tue, Jun 16, 2009 at 6:08 PM, Tyler Roscoe wrote: > Don't forget to cc the list! Especially since I'm not sure what else I > can tell you. > > On Tue, Jun 16, 2009 at 05:24:08PM -0500, Mark Lohry wrote: > > I added "add_depe

Re: [CMake] Handling library interdependencies

2009-06-16 Thread Mark Lohry
Thanks for the reply. I added "add_dependencies( lib1 lib2 )", "add_dependencies( lib2 lib1 )", and "add_dependencies( execthing lib1 lib2 )" in their appropriate places, and changed the libraries to STATIC, but no change. Yes, everything compiles when i build the libraries and executables separa

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Michael Jackson
myApp: project(myApp) add_subdirectory(commonLib) add_subdirectory(lib1) add_subdirectory(lib2) add_executable(myApp ${files}) target_link_libraries(myApp lib1 lib2) lib1/lib2: project(lib1) add_library(lib1 ${files}) target_link_libraries(lib1 commonLib) I am doing exactly this currently

Re: [CMake] Handling library interdependencies

2009-06-16 Thread Tyler Roscoe
Don't forget to cc the list! Especially since I'm not sure what else I can tell you. On Tue, Jun 16, 2009 at 05:24:08PM -0500, Mark Lohry wrote: > I added "add_dependencies( lib1 lib2 )", "add_dependencies( lib2 lib1 )", > and "add_dependencies( execthing lib1 lib2 )" in their appropriate places,

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 06:49:38PM -0400, David Cole wrote: > What is your CMake code for this "diamond dependency" case? The case as layed out is hypothetical, of course, but I'm thinking something like this: myApp: project(myApp) add_subdirectory(lib1) add_subdirectory(lib2) add_executable(m

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread David Cole
What is your CMake code for this "diamond dependency" case? Is there a separate directory for each of the libs involved? Whichever CMakeLists file glues them all together should be able to add_subdirectory just once on each of them Why do you need two add_subdirectory calls for commonLib? O

Re: [CMake] building without using MSVC GUI

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 06:11:35PM -0400, alex gouaillard wrote: > I would like to be able to directly build after the cmake > configuration stage without needing to open the sln file in MSVC. > How could I do that? This isn't a CMake question; this is a Visual Studio question. You can run deve

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 06:04:17PM -0400, Bill Hoffman wrote: > This was never expected to work, and CMake creates "bad" makefiles in > versions of CMake prior to this. Basically, CMake was over-writing the > makefiles as many times as the directory was there. This causes very > odd things to

[CMake] building without using MSVC GUI

2009-06-16 Thread alex gouaillard
hi, I would like to be able to directly build after the cmake configuration stage without needing to open the sln file in MSVC. How could I do that? alex. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitwa

[CMake] CMake generating wrong MSVC flags for static libraries?

2009-06-16 Thread Eric Lemings
It appears that CMake is, by default, generating Makefiles that build static libraries with the /MD (or /MDd) flag. Can anyone please verify that? If so, shouldn't CMake be using the /MT (or /MTd) flag when building static libraries? Is this a known issue? Thanks, Eric. __

Re: [CMake] Creating a dynamic library with a static library hidden inside

2009-06-16 Thread Andreas Pakulat
On 16.06.09 14:58:28, Michael Leong wrote: > > > 1: A dynamic library containing openssl which does not require me to > > > link in openssl if I want to use it to make an executable. > > > > AFAIK what you're doing ought to work. Maybe since this is Windows you > > need some symbol decoration magic

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Bill Hoffman
Tyler Roscoe wrote: On Tue, Jun 16, 2009 at 07:41:20PM +0200, Floca Ralf Omar wrote: using CMake 2.6.4 to build one of our projects an error occurred due to the repeated usage of add_subdirectory on the same path. In former versions of CMake the repeated usage was accepted and worked fine. I'

Re: [CMake] Creating a dynamic library with a static library hidden inside

2009-06-16 Thread Michael Leong
Hi Tyler, Thanks for your response. > > add_library(libeay-static STATIC IMPORTED) > > set_property(TARGET libeay-static PROPERTY IMPORTED_LOCATION > > win32/lib/libeay32.lib) > > add_library(ssleay-static STATIC IMPORTED) > > set_property(TARGET ssleay-static PRO

Re: [CMake] Handling library interdependencies

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 03:41:51PM -0500, Mark Lohry wrote: > I have a number of subdirectories, each containing source to be built into > their own libraries, which contain many interdependencies. I'm trying to > build an executable to link against these libraries, and I'm getting a > console full

Re: [CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 07:41:20PM +0200, Floca Ralf Omar wrote: > using CMake 2.6.4 to build one of our projects an error occurred due to > the repeated usage of add_subdirectory on the same path. > > In former versions of CMake the repeated usage was accepted and worked > fine. I'm in the same

Re: [CMake] Creating a dynamic library with a static library hidden inside

2009-06-16 Thread Tyler Roscoe
On Tue, Jun 16, 2009 at 10:30:57AM -0700, Michael Leong wrote: > add_library(libeay-static STATIC IMPORTED) > set_property(TARGET libeay-static PROPERTY IMPORTED_LOCATION > win32/lib/libeay32.lib) > add_library(ssleay-static STATIC IMPORTED) > set_property(TARGET ss

[CMake] Handling library interdependencies

2009-06-16 Thread Mark Lohry
Novice question: I have a number of subdirectories, each containing source to be built into their own libraries, which contain many interdependencies. I'm trying to build an executable to link against these libraries, and I'm getting a console full of "undefined reference to..." errors on linking

[CMake] Avoiding error when using add_subdirectory twice on same path (CMake 2.6.4)

2009-06-16 Thread Floca Ralf Omar
Hello, using CMake 2.6.4 to build one of our projects an error occurred due to the repeated usage of add_subdirectory on the same path. In former versions of CMake the repeated usage was accepted and worked fine. The referenced project has the following scripting steps: 1. The source tree

[CMake] Creating a dynamic library with a static library hidden inside

2009-06-16 Thread Michael Leong
Hi all, I'm using CMake 2.6, and want to make a dynamic library that contains a static library inside. In more detail, I'm trying to take an openssl static library and compile it into a dynamic library, without the openssl routines being externally visible. Is it possible to do this, and if so,

Re: [CMake] Copy target from different configurations

2009-06-16 Thread Alexandre.Feblot
Cool, Here it is: http://public.kitware.com/Bug/view.php?id=9163 Thanks Cordialement / Regards, Alexandre Feblot -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Brad King Sent: Tuesday, 16 June 2009 17:48 To: Feblot, Alexandre (M Risk) Cc:

Re: [CMake] One target being built several times during parallel build

2009-06-16 Thread Brad King
Denis Scherbakov wrote: 6. gmake -j5 mytest printf 7. I observe target PUTS being built 2 times and "Building CXX object puts/CMakeFiles/puts.dir/puts.cpp.o" 2 times. Also counter goes to 150%. Your project looks fine. I missed in your earlier post that you ran "gmake -j9 E1 E2 E3". The probl

Re: [CMake] Multiple COMMANDs in EXECUTE_PROCESS

2009-06-16 Thread Brad King
David Cole wrote: sequentially... On Tue, Jun 16, 2009 at 3:19 AM, Denis Scherbakov mailto:denis_scherba...@yahoo.com>> wrote: I have multiple commands specified in one EXECUTE_PROCESS call like: EXECUTE_PROCESS(COMMAND cmd1 ... COMMAND cmd2 ... COMMAND cmd3...) Can anybody te

Re: [CMake] Removing flags added by the Platform modules

2009-06-16 Thread Alexandre.Feblot
Hi, look at this variable: CMAKE_USER_MAKE_RULES_OVERRIDE_ Cordialement / Regards, Alexandre Feblot -Original Message- From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of Will Dicharry Sent: Wednesday, 03 June 2009 01:23 To: cmake@cmake.org Subject: [CMake] Removi

Re: [CMake] Copy target from different configurations

2009-06-16 Thread Brad King
alexandre.feb...@thomsonreuters.com wrote: Hi, yes, this is definitely what I would like, there is no other way to get rid of these Debug/Release directories. I even would like to have the corresponding variables: - CMAKE_LIBRARY_OUTPUT_DIRECTORY_ - CMAKE_ARCHIVE_OUTPUT_DIRECTORY_ - CMAKE

Re: [CMake] Copy target from different configurations

2009-06-16 Thread Alexandre.Feblot
Hi, yes, this is definitely what I would like, there is no other way to get rid of these Debug/Release directories. I even would like to have the corresponding variables: - CMAKE_LIBRARY_OUTPUT_DIRECTORY_ - CMAKE_ARCHIVE_OUTPUT_DIRECTORY_ - CMAKE_RUNTIME_OUTPUT_DIRECTORY_ Do I need to fill

Re: [CMake] One target being built several times during parallel build

2009-06-16 Thread Denis Scherbakov
> > I have a project with three executables: > > > > E1 depends on lib A > > E2 depends on lib A > > E3 depends on lib A > > > > First A must be built, then E1, E2 and E3. > > I do "gmake -j9 E1 E2 E3" and I see that target "A" is > being built 3? times > > instead of just one. I also notice tha

Re: [CMake] One target being built several times during parallel build

2009-06-16 Thread Brad King
Denis Scherbakov wrote: I have a project with three executables: E1 depends on lib A E2 depends on lib A E3 depends on lib A First A must be built, then E1, E2 and E3. I do "gmake -j9 E1 E2 E3" and I see that target "A" is being built 3? times instead of just one. I also notice that progress co

[CMake] One target being built several times during parallel build

2009-06-16 Thread Denis Scherbakov
I have a project with three executables: E1 depends on lib A E2 depends on lib A E3 depends on lib A First A must be built, then E1, E2 and E3. I do "gmake -j9 E1 E2 E3" and I see that target "A" is being built 3? times instead of just one. I also notice that progress counter goes past 100%. So

Re: [CMake] Multiple COMMANDs in EXECUTE_PROCESS

2009-06-16 Thread David Cole
sequentially... On Tue, Jun 16, 2009 at 3:19 AM, Denis Scherbakov < denis_scherba...@yahoo.com> wrote: > > I have multiple commands specified in one EXECUTE_PROCESS call like: > > EXECUTE_PROCESS(COMMAND cmd1 ... COMMAND cmd2 ... COMMAND cmd3...) > > Can anybody tell me if these commands are exec

Re: [CMake] cmake_symlink_library: error when cross-compiling with WinXP

2009-06-16 Thread Hendrik Sattler
Zitat von Kai Fischer : I am cross-compiling a custom Linux ARM library with Windows XP using the ARM toolchain from Code-Sourcery (no cygwin, mingw or anything like that). To accomplish that the "SONAME" of the library will be correctly set, I set the VERSION property for it in CMakeLists.txt w

[CMake] cmake_symlink_library: error when cross-compiling with WinXP

2009-06-16 Thread Kai Fischer
Hi, I am cross-compiling a custom Linux ARM library with Windows XP using the ARM toolchain from Code-Sourcery (no cygwin, mingw or anything like that). To accomplish that the "SONAME" of the library will be correctly set, I set the VERSION property for it in CMakeLists.txt with: SET_TARGET_PROP

[CMake] Multiple COMMANDs in EXECUTE_PROCESS

2009-06-16 Thread Denis Scherbakov
I have multiple commands specified in one EXECUTE_PROCESS call like: EXECUTE_PROCESS(COMMAND cmd1 ... COMMAND cmd2 ... COMMAND cmd3...) Can anybody tell me if these commands are executed sequentially or in parallel? Also what about ADD_CUSTOM_COMMAND, .. TARGET and so on? Denis __