Re: [CMake] cross g++ linking shared instead of static libgcc

2011-01-12 Thread Hendrik Sattler
Am Donnerstag, 13. Januar 2011, 02:10:12 schrieb Darren Hollenbeck: > I am using CMake to cross compile with an arm toolchain and getting a > linker error: > undefined reference to `__sync_fetch_and_add_4' > > the toolchain has both a shared and static libgcc: > ./lib/gcc/arm-linux-gnueabi/4.5.2/l

[CMake] cross g++ linking shared instead of static libgcc

2011-01-12 Thread Darren Hollenbeck
I am using CMake to cross compile with an arm toolchain and getting a linker error: undefined reference to `__sync_fetch_and_add_4' the toolchain has both a shared and static libgcc: ./lib/gcc/arm-linux-gnueabi/4.5.2/libgcc.a ./lib/gcc/arm-linux-gnueabi/4.5.2/libgcc_eh.a ./arm-linux-gnueabi/lib/li

Re: [CMake] CHECK_INCLUDE_FILES ignores CMAKE_FIND_ROOT_PATH, but should it?

2011-01-12 Thread Bjørn Forsman
2011/1/10 Bjørn Forsman : > Hi all, > > I just found out that CHECK_INCLUDE_FILES ignores CMAKE_FIND_ROOT_PATH. The > documentation for CHECK_INCLUDE_FILES says: > >  ... >  The following variables may be set before calling this macro  to >  modify the way the check is run: > >    CMAKE_REQUIRED_FL

[CMake] InstallRequiredSystemLibraries.cmake

2011-01-12 Thread J Decker
This currently has no support for watcom's libraries, I'm working on adding that in the same method basically that visual studio uses for all of its versions; this is still in progress but I'll come up with soemhting like a patch in abit. While doing this I found that there is a bug with VS2010 su

Re: [CMake] CPack and configure_file

2011-01-12 Thread Eric Noulard
2011/1/12 Tobias Ellinghaus : > Am Tuesday 11 January 2011 schrub Eric Noulard: > > [...] > >> in fact I think the "real" source for this is the fact the CPack lacks >> the notion >> of "EXTRA" distribution file which is available with autoconf, EXTRA_DIST >> var >> http://www.gnu.org/software/hell

Re: [CMake] Clarification for quoting of parameters for "add_executable()"

2011-01-12 Thread SF Markus Elfring
What would you like it to print? It depends on the syntax interpretation if the passed quoted parameter will be processed as a CMake list. David Cole pointed it out to me that this is not the case if some data are enclosed by quotation marks. http://public.kitware.com/Bug/view.php?id=11677#

Re: [CMake] CMake Digest, Vol 81, Issue 41

2011-01-12 Thread Allen D Byrne
OK, I got past my JNI issue (must set java version number) - except now I have a problem with the classpath for building the java files only on windows! On linux everyone's happy. On windows, using VS2008, the classpath in the project files have been converted from ';' to spaces? Any ideas? A

Re: [CMake] Clarification for quoting of parameters for "add_executable()"

2011-01-12 Thread Bill Hoffman
On 1/12/2011 4:21 PM, SF Markus Elfring wrote: I hope that the involved technical details can be better resolved in a wider audience. Now I would like to show a small script which demonstrates a specific detail in the wording of an error message that I did not expect in this way. cmake_minimum

Re: [CMake] Clarification for quoting of parameters for "add_executable()"

2011-01-12 Thread SF Markus Elfring
I hope that the involved technical details can be better resolved in a wider audience. Now I would like to show a small script which demonstrates a specific detail in the wording of an error message that I did not expect in this way. cmake_minimum_required(VERSION 2.6) project(Bug11677) set(

Re: [CMake] How to have a target depend on an External Project

2011-01-12 Thread David Cole
So add_dependencies should work for you. Let us know if it's not working like you think it should... On Wed, Jan 12, 2011 at 3:48 PM, kent williams wrote: > Ironically the reason I want to make a target depend on an external > project is that our top level project is already built as an > Exter

Re: [CMake] How to have a target depend on an External Project

2011-01-12 Thread kent williams
Ironically the reason I want to make a target depend on an external project is that our top level project is already built as an ExternalProject for all the reasons that have been mentioned. I need a custom target to depend on THAT external project, just in the sense that I want it to be built onl

Re: [CMake] How to have a target depend on an External Project

2011-01-12 Thread David Cole
add_dependencies does work to make sure that ExternalProject targets build before internal targets, if you need that. But, like Marcus said, you probably need the ExternalProject to be configured and built before your own calls to find_package... so if you have that chicken and egg problem, you sh

Re: [CMake] How to have a target depend on an External Project

2011-01-12 Thread Allen D Byrne
While Marcus states what is likely the preferred way, I just added an ADD_DEPENDENCIES(internal_target external_target) statement that seems to always work? Allen > Date: Wed, 12 Jan 2011 13:23:52 -0500 > From: "Marcus D. Hanwell" > Subject: Re: [CMake] How to have a target depend on an Exter

Re: [CMake] CPack and configure_file

2011-01-12 Thread Tobias Ellinghaus
Am Tuesday 11 January 2011 schrub Eric Noulard: [...] > in fact I think the "real" source for this is the fact the CPack lacks > the notion > of "EXTRA" distribution file which is available with autoconf, EXTRA_DIST > var > http://www.gnu.org/software/hello/manual/automake/Basics-of-Distribution.

Re: [CMake] Still have a problem to cross-compile a simple C++ program

2011-01-12 Thread David Cole
First, use the correct spelling: -DCMAKE_TOOLACHAIN_FILE should be: -DCMAKE_TOOLCHAIN_FILE If that doesn't solve it entirely, then try using a name without the "+" character in it for the PROJECT command. If that doesn't do it, give us more details, I guess. I'm not a cross-compiling expert, so

[CMake] Still have a problem to cross-compile a simple C++ program

2011-01-12 Thread Enrique Izaguirre
Hello again: For some reason when I try to compile a simple C++ program, it takes the wrong compiler, even though I am setting the appropriate one in the Toolchain file; I am working on Cygwin, and I am trying to compile for a LInux environment using g++-linux compiler, which I tested it and works

[CMake] CTest options being ignored : CTest - 2.8.2

2011-01-12 Thread Nolen, Steven D
It appears there are some inconsistencies with specifying different SOURCE/BUILD when using functions like ctest_configure, ctest_coverage, etc. I have tried specifying different binary/source directories but it only seems like it has been partially implemented. To verify this, I went into cm

Re: [CMake] How to have a target depend on an External Project

2011-01-12 Thread Marcus D. Hanwell
On Wed, Jan 12, 2011 at 12:53 PM, kent williams wrote: > For better or worse (mostly better) we are now heavy users of > ExternalProject.  That module works really well to pull in external > dependencies and get them built. > > ExternalProject_add has a DEPENDS keyword that lets you specify > depe

Re: [CMake] ctest and git submodules

2011-01-12 Thread Brad King
On 1/12/2011 12:43 PM, David Cole wrote: > Are you using CMake 2.8.3? If not, you should upgrade. There were some > improvements made w.r.t. ctest_update and git repos in that release. I > think the submodule update was one of them... Among the improvements was the submodule update command: htt

Re: [CMake] ctest and git submodules

2011-01-12 Thread Marcus D. Hanwell
On Wed, Jan 12, 2011 at 12:16 PM, Gerhard Gappmeier wrote: > Hi, > > my project is stored in a git repo with submodules. > > I'm wondering if ctest is updating also the submodules when running > > ctest Nightly|Continuous etc. > > or just the main repo. > > I believe not, unless I have some other

Re: [CMake] List operations

2011-01-12 Thread Andreas Pakulat
On 12.01.11 11:56:53, kent williams wrote: > I'm generating a list of files with file(GLOB), but then I want to > remove some filenames from the resulting list. > > So essentially I'd like a CMake function like this > > function(RemoveItemsFromList ListA ListToRemove) > endfunction(RemoveItemsFro

[CMake] List operations

2011-01-12 Thread kent williams
I'm generating a list of files with file(GLOB), but then I want to remove some filenames from the resulting list. So essentially I'd like a CMake function like this function(RemoveItemsFromList ListA ListToRemove) endfunction(RemoveItemsFromList) and I don't know what to put in the middle ;-) __

[CMake] How to have a target depend on an External Project

2011-01-12 Thread kent williams
For better or worse (mostly better) we are now heavy users of ExternalProject. That module works really well to pull in external dependencies and get them built. ExternalProject_add has a DEPENDS keyword that lets you specify dependencies on other External Projects. But an ExternalProject isn't

Re: [CMake] ctest and git submodules

2011-01-12 Thread David Cole
Are you using CMake 2.8.3? If not, you should upgrade. There were some improvements made w.r.t. ctest_update and git repos in that release. I think the submodule update was one of them... HTH, David On Wed, Jan 12, 2011 at 12:16 PM, Gerhard Gappmeier < gerhard.gappme...@ascolab.com> wrote: >

Re: [CMake] ctest and git submodules

2011-01-12 Thread David Cole
Are you using CMake 2.8.3? If not, you should upgrade. There were some improvements made w.r.t. ctest_update and git repos in that release. I think the submodule update was one of them... HTH, David On Wed, Jan 12, 2011 at 12:16 PM, Gerhard Gappmeier < gerhard.gappme...@ascolab.com> wrote: >

[CMake] ctest and git submodules

2011-01-12 Thread Gerhard Gappmeier
Hi, my project is stored in a git repo with submodules. I'm wondering if ctest is updating also the submodules when running ctest Nightly|Continuous etc. or just the main repo. I believe not, unless I have some other problems with my test script. I could do a manual "git pull && git submodule in

[CMake] feature request for eclipse

2011-01-12 Thread Andrea Galeazzi
Suppose you have a project with a lot of sub-projects like: add_subdirectory("path1/lib1" "${CMAKE_CURRENT_BINARY_DIR}/lib1") add_subdirectory("path2/lib2" "${CMAKE_CURRENT_BINARY_DIR}/lib2") . When I choose VS as target CMake generates a solution made up of each sub-project with

Re: [CMake] fixup_bundle, shared libs and Plugins

2011-01-12 Thread Crni Gorac
On Tue, Jan 11, 2011 at 11:00 PM, David Cole wrote: > On Tue, Jan 11, 2011 at 4:21 PM, Crni Gorac wrote: >> >> [ ... ] >> >> I hope you guys don't mind if I jump in and re-ask related question I >> posted couple days ago (I'm sure Michael will soon face the same >> problem, if he's building als

Re: [CMake] CMake Error: Error required internal CMake variable not set, ...

2011-01-12 Thread Michael Hertling
On 01/12/2011 04:29 PM, Enrique Izaguirre wrote: > Hello, > > I am new to CMake and following a few examples, I am now trying to > cross-compile a C++ program from Cygwin to Linux, and I got the following > errors: > > CMake Error: Error required internal CMake variable not set, cmake may be > no

Re: [CMake] conditional selection of either local "just built" or system versions of a library

2011-01-12 Thread Michael Hertling
On 01/11/2011 05:46 PM, Marco wrote: > Dear CMake experts, > > I'm facing the following problem. I have a project with many > subdirectories, all at the same hierarchical level: > > /my/project/path/CMakeLists.txt > /my/project/path/A - include > |- src > |- C

[CMake] CMake Error: Error required internal CMake variable not set, ...

2011-01-12 Thread Enrique Izaguirre
Hello, I am new to CMake and following a few examples, I am now trying to cross-compile a C++ program from Cygwin to Linux, and I got the following errors: CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C++_COMPILER_ENV

Re: [CMake] CPack tar ownership

2011-01-12 Thread Eric Noulard
2011/1/12 Tim St. Clair : > As a side issue: not all platforms which support the TGZ natively > support fakeroot. > > I think ownership rights should likely be a CPACK option as a result. True off course. Would you be willing to file a feature request and possibly a patch proposal? -- Erk Membre

Re: [CMake] CPack tar ownership

2011-01-12 Thread Tim St. Clair
As a side issue: not all platforms which support the TGZ natively support fakeroot. I think ownership rights should likely be a CPACK option as a result. Cheers, Tim On Sat, Jan 8, 2011 at 8:22 AM, Eric Noulard wrote: > 2011/1/8 Tim St. Clair : >> This will be across several *nix platforms, >>

Re: [CMake] CMake Java Support

2011-01-12 Thread Allen D Byrne
Andreas, Thanks for providing these files! I have finally been able to progress on converting our java product to cmake. I have one suggestion: Add to the add_java function the classpath for the target; set(${_TARGET_NAME}_CLASSPATH ".${CMAKE_JAVA_INCLUDE_PATH_FINAL}/${_TARGET_NAME}.jar" PA

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring
Here is the code: I have got another idea. Did anybody try to use the C/C++ preprocessor ("cpp" and eventually including the compiler) to output a file in a format which is suitable for processing of this data as a project specification for CMake? Regards, Markus ___

Re: [CMake] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 03:03 PM, Alexey Livshits wrote: >> Thing is, you can't *rely* on DESTDIR *not* being used by the user of >> your project. If a user shoots himself in the foot, that's his fault, >> but when designing your test architecture you IMHO shouldn't make the >> use of DESTDIR impossible. I'm

Re: [CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
> Thing is, you can't *rely* on DESTDIR *not* being used by the user of > your project. If a user shoots himself in the foot, that's his fault, > but when designing your test architecture you IMHO shouldn't make the > use of DESTDIR impossible. I'm sure Debian/Ubuntu/the/whole/zoo would > object to

Re: [CMake] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 02:47 PM, David Cole wrote: > On Wed, Jan 12, 2011 at 8:34 AM, Alexey Livshits wrote: > >>> Well, if you don't want any help fixing the real problem, then the >>> answer is simple: CMake can't possibly give you that information because >>> of DESTDIR. >> >> Thank you. >> >>> So, go

Re: [CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
> Why can't you just set CMAKE_INSTALL_PREFIX to some path that you know and > then reference that from your tests that run the installed version? I thought about it, but I'd like to keep it independent of some known path. If you mean, there is no other way, I should give them a try. > DESTDIR wi

Re: [CMake] redirect object output directory

2011-01-12 Thread Andrea Galeazzi
David Cole ha scritto: It is *possible*, but you would have to change the source code to CMake... We select directories on a per-target basis to avoid name clashes between object files named the same but from different targets. There is no way to adjust it as a project CMakeLists w

Re: [CMake] Path to installed target

2011-01-12 Thread David Cole
On Wed, Jan 12, 2011 at 8:34 AM, Alexey Livshits wrote: > > Well, if you don't want any help fixing the real problem, then the > > answer is simple: CMake can't possibly give you that information because > > of DESTDIR. > > Thank you. > > > So, go and fix your project. > > I wish I could, but its

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
> Which software licence does belong to your approach? I don't know :) -- BG, Alexey ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check

Re: [CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
> Well, if you don't want any help fixing the real problem, then the > answer is simple: CMake can't possibly give you that information because > of DESTDIR. Thank you. > So, go and fix your project. I wish I could, but its not so simple. If you have an idea, just let me know. -- BG, Alexey __

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring
Here is the code: Thanks. - Very nice. :-) Which software licence does belong to your approach? Would anybody like to transform your example into an official CMake module? Regards, Markus ___ Powered by www.kitware.com Visit other Kitware open-s

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
Here is the code: find_file(myproject_BUILD_NUMBER_FILE_FOUND myproject_build_number.txt PATHS ${myproject_SOURCE_DIR}) if(${myproject_BUILD_NUMBER_FILE_FOUND} MATCHES "NOTFOUND") set(myproject_CURRENT_BUILD_NUM 1) else() file(READ ${myproject_SOURCE_DIR}/myproject_build_number.tx

Re: [CMake] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 02:16 PM, Alexey Livshits wrote: > As I mentioned above, there are targets foo1 and foo2, build from foo > sources, and the output name has to be foo. This is the conflict. The > test depends from foo1 and bar2. > >> If you don't explain the problem more clearly, people won't be able

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring
I use a simple text file with the build number, which is tracked under VCS. During the build I parse it, generate my version header, increase the number, save it to the file and check it in. Which (CMake) commands do you use for this approach? Regards, Markus ___

Re: [CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
As I mentioned above, there are targets foo1 and foo2, build from foo sources, and the output name has to be foo. This is the conflict. The test depends from foo1 and bar2. > If you don't explain the problem more clearly, people won't be able to > help you; particularly because I suspect that you

Re: [CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
> If the two "version" are needed you may build them in a single build. >... > but may be I'm missing something about your "2 versions"? That's what I already do. The problem is, libv1 and libv2 should be called libv. > Alternatively, may be you can decide that your needed > "temporary" install wi

Re: [CMake] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 01:48 PM, Alexey Livshits wrote: >> Yes, make the tests run without installation. To give more advice, we'd >> need to know more about those "dependencies". Are they other >> executables? Data files? Libraries? > > Well, if I could do that, I wouldn't ask ;) > I have 2 versions, whic

Re: [CMake] Path to installed target

2011-01-12 Thread Eric Noulard
2011/1/12 Alexey Livshits : >> Yes, make the tests run without installation. To give more advice, we'd >> need to know more about those "dependencies". Are they other >> executables? Data files? Libraries? > > Well, if I could do that, I wouldn't ask ;) > I have 2 versions, which are built from the

[CMake] crosscompiling: what happened after change cmakelists.txt?

2011-01-12 Thread Dave Milter
Hi, when I run cmake like this: cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-sdk-gcc.cmake -DMY_TOOLCHAIN_PATH=$HOME/toolchains/sdk/ path/to/CMakeLists.txt with toolchain-sdk-gcc.cmake: SET(CMAKE_SYSTEM_NAME Linux) SET(CMAKE_SYSTEM_VERSION 1) SET(QT_QMAKE_EXECUTABLE ${MY_TOOLCHAIN_PATH}/bin/qmake) #

Re: [CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
> Yes, make the tests run without installation. To give more advice, we'd > need to know more about those "dependencies". Are they other > executables? Data files? Libraries? Well, if I could do that, I wouldn't ask ;) I have 2 versions, which are built from the same sources. So I have to have 2 d

Re: [CMake] Path to installed target

2011-01-12 Thread Michael Wild
On 01/12/2011 01:24 PM, Alexey Livshits wrote: >> What do you want to do? > > I have some tests, which cannot be run without installation because of > dependencies. So I need to specify the install path to add_test. Is > there a better approach? > Yes, make the tests run without installation. To

Re: [CMake] TRY_LINK and CheckCXXSourceLinks ??

2011-01-12 Thread Marcel Loose
>>> On 11-1-2011 at 21:51, in message <20110111213036.af4c126...@public.kitware.com>, Rolf Eike Beer wrote: > Am Dienstag, 11. Januar 2011, 11:20:06 schrieb David Cole: >> Yes... this confused me when I first encountered it as well. >> >> TRY_COMPILE is misnamed in CMake. >> >> In functionality

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread Alexey Livshits
2011/1/12 SF Markus Elfring : > Hello, > > I would like the add the CMake approach for software generation to a > project. My project example supports also other build tools. > This has got consequences on the way how informations like version numbers > are shared between these approaches. > > The

Re: [CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
> What do you want to do? I have some tests, which cannot be run without installation because of dependencies. So I need to specify the install path to add_test. Is there a better approach? -- BG, Alexey ___ Powered by www.kitware.com Visit other Kitw

Re: [CMake] redirect object output directory

2011-01-12 Thread David Cole
It is *possible*, but you would have to change the source code to CMake... We select directories on a per-target basis to avoid name clashes between object files named the same but from different targets. There is no way to adjust it as a project CMakeLists writer... intentionally. We view it as

Re: [CMake] Path to installed target

2011-01-12 Thread Eric Noulard
2011/1/12 Alexey Livshits : > Hello, > how can I determine the path to installed target? When ? If it is inside a CMakeLists.txt i.e. at CMake time usually you can't unless you specify absolute install path in your install rules. > The problem is, if I > set DESTDIR for example "D:\", I the insta

[CMake] redirect object output directory

2011-01-12 Thread Andrea Galeazzi
Is it possible to change the default path (project.dir) where the object files (.o or .obj) are put? ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring
Are you using source control? Yes. - But there are challenges to query content management systems in a portable way. I use a combination of version in the main CMakeLists.txt and the svn rev. Variables from these get into a generated project header file that is also generated in the main CM

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread John Drescher
> I would like the add the CMake approach for software generation to a > project. My project example supports also other build tools. > This has got consequences on the way how informations like version numbers > are shared between these approaches. > > The CMake tutorial describes components for t

[CMake] How to assign version numbers from a source header to CMake variables?

2011-01-12 Thread SF Markus Elfring
Hello, I would like the add the CMake approach for software generation to a project. My project example supports also other build tools. This has got consequences on the way how informations like version numbers are shared between these approaches. The CMake tutorial describes components for

[CMake] Path to installed target

2011-01-12 Thread Alexey Livshits
Hello, how can I determine the path to installed target? The problem is, if I set DESTDIR for example "D:\", I the install path becomes "D:\Programme\", so I cannot use DESTDIR to determine the path. -- BG, Alexey ___ Powered by www.kitware.com Visit o