[CMake] visual studio 2010 warning message

2010-10-01 Thread J Decker
with cmake version 2.8.2.20100929-ge15e0 bad warning? warning: The variable, 'CMAKE_C_STANDARD_LIBRARIES', given on the command line, was not used within the build. On a simple project with a single library, - cmake_minimum_required(VERSION 2.8 ) project( test1 ) add_library( test SHARED te

Re: [CMake] target property FOLDER

2010-10-01 Thread James Bigler
On Fri, Oct 1, 2010 at 4:16 PM, James Bigler wrote: > I really like the new FOLDER property for targets. > > I'm wondering if it could be extended to allow me to set this for a whole > directory. Something like: > > set_property(DIRECTORY PROPERTY FOLDER "Utilities/3rdParty") > add_executable(a

[CMake] target property FOLDER

2010-10-01 Thread James Bigler
I really like the new FOLDER property for targets. I'm wondering if it could be extended to allow me to set this for a whole directory. Something like: set_property(DIRECTORY PROPERTY FOLDER "Utilities/3rdParty") add_executable(a ...) add_library(b ...) add_subdirectory(dir) # dir also get's thi

Re: [CMake] Following dependencies through generated header file

2010-10-01 Thread Michael Hertling
On 10/01/2010 10:56 PM, Óscar Fuentes wrote: > A file `foo.cpp' has this: > > #include "bar.inc" > > `bar.inc' is a generated file, and is marked as such. It is generated > processing a file `zoo.cpp' with an utility executed through a custom > command. > > It would be very convenient to inspect

[CMake] Following dependencies through generated header file

2010-10-01 Thread Óscar Fuentes
A file `foo.cpp' has this: #include "bar.inc" `bar.inc' is a generated file, and is marked as such. It is generated processing a file `zoo.cpp' with an utility executed through a custom command. It would be very convenient to inspect the header files referenced from `zoo.cpp' and associate them

Re: [CMake] Build several libraries with different compilation flags

2010-10-01 Thread J Decker
On Fri, Oct 1, 2010 at 8:32 AM, Marcel Loose wrote: > Hi Eric, > > I'm not sure your solution is going to work. Once your file1, file2, ... > are compiled for building my_lib1, there's reason for CMake to compile > them again for my_lib2, because the object files are already up-to-date. > I guess

Re: [CMake] HOWTO: Generate Use*.cmake files for installation

2010-10-01 Thread kent williams
No, I didn't get any clues as to how this is handled. In ITK it is handled subtly, which is to say I couldn't figure out how it worked from reading the CMakeLists.txt. What I ended up doing is to create the Config file twice -- once for the eventual installation, and once for the in-place usage.

Re: [CMake] Removing overkill linking

2010-10-01 Thread Paul McEnery
On 1 October 2010 16:40, Marcel Loose wrote: > Hi Paul, > > Probably one of the packages that you "pull in" -- dbus, dbug-glib, > libftdi, libglade, gtk+2, hal -- is introducing this dependency. Check > the different *_LIBRARIES variables and you'll probably find the fly in > your ointment. > > Yo

Re: [CMake] Stopping the VS build when configure fails

2010-10-01 Thread John Drescher
> I just hit "Build Solution" which caused ZERO_CHECK project to run because > my CMakeLists.txt file had changed.  ZERO_CHECK ran CMake which attempted to > generate a new solution.  Typically this results in a good new project and > the VS plugin detects this and asks me to load the new project f

Re: [CMake] CMake/Buildbot xplat upload?

2010-10-01 Thread David Cole
On Fri, Oct 1, 2010 at 1:25 PM, Eric Noulard wrote: > 2010/10/1 : > > > > Hi list, > > > > I Googled for this but didn't find anything. > > > > CMake is integrating well with Buildbot to make a sort of poor-man's > > build farm. The one thing I can't seem to work out is a crossplatform > > way t

Re: [CMake] CMake/Buildbot xplat upload?

2010-10-01 Thread Eric Noulard
2010/10/1 : > > Hi list, > > I Googled for this but didn't find anything. > > CMake is integrating well with Buildbot to make a sort of poor-man's > build farm. The one thing I can't seem to work out is a crossplatform > way to upload CPack-built packages (Windows and Linux) to a web server > (Ubu

Re: [CMake] Build several libraries with different compilation flags

2010-10-01 Thread Michael Hertling
On 10/01/2010 05:10 PM, pellegrini wrote: > Hi Ryan, > > Yes, that might be the solution if I wanted to change the compiler flags > for the whole library but in my case, that is not on the whole > library that I want to apply a new set of compiler flags but only on a > small number of files. Yo

Re: [CMake] Stopping the VS build when configure fails

2010-10-01 Thread James Bigler
On Fri, Oct 1, 2010 at 6:22 AM, John Drescher wrote: > On Fri, Oct 1, 2010 at 2:21 AM, Rolf Eike Beer wrote: > > Am Friday 01 October 2010 schrieb John Drescher: > >> On Thu, Sep 30, 2010 at 7:47 PM, James Bigler > wrote: > >> > On Thu, Sep 30, 2010 at 5:42 PM, James Bigler > > wrote: > >> >>

Re: [CMake] Build several libraries with different compilation flags

2010-10-01 Thread pellegrini
Hi Marcel, Yes, you are right but as I said to Ryan my problem is that I do not want to change the compiler flags for the whole library (in that case the set_target_properties would be the appropriated way to do) but only for a few files of my library. What I want to do seems tricky (or perh

Re: [CMake] Removing overkill linking

2010-10-01 Thread Marcel Loose
Hi Paul, Probably one of the packages that you "pull in" -- dbus, dbug-glib, libftdi, libglade, gtk+2, hal -- is introducing this dependency. Check the different *_LIBRARIES variables and you'll probably find the fly in your ointment. You may definitely want to look into the LINK_INTERFACE_LIBRAR

Re: [CMake] Build several libraries with different compilation flags

2010-10-01 Thread Marcel Loose
Hi Eric, I'm not sure your solution is going to work. Once your file1, file2, ... are compiled for building my_lib1, there's reason for CMake to compile them again for my_lib2, because the object files are already up-to-date. I guess you'll have a better chance using target_properties, as Ryan sug

[CMake] Removing overkill linking

2010-10-01 Thread Paul McEnery
Hi. I'm a cmake newbie, and have only been exposed to cmake in the form of maintaining a Debian package. I'm working on packaging galinette (http://galinette.sourceforge.net). I noticed that cmake appears to be linking against libraries which are not actually required. Here is a snippet of the dpk

Re: [CMake] Build several libraries with different compilation flags

2010-10-01 Thread pellegrini
Hi Ryan, Yes, that might be the solution if I wanted to change the compiler flags for the whole library but in my case, that is not on the whole library that I want to apply a new set of compiler flags but only on a small number of files. Ryan Pavlik a écrit : Look at the target properties

[CMake] Use Boost wave as Preprocessor.

2010-10-01 Thread Surya Kiran Gullapalli
Hello all, I'm trying to use Boost.Wave as C++ preprocessor. How can i tell CMake to use Boost.Wave as preprocessor instead of standard preprocessor which comes with C++ compiler ? I'm targeting VS 2008 and GCC. There are variables in CMake to specify compiler but none, as I could see, to specify

Re: [CMake] Separate CXXFLAGS and LDFLAGS

2010-10-01 Thread Michael Hertling
On 10/01/2010 03:55 PM, Marek Szuba wrote: > Hello, > > How can one define C++ compiler flags which are used ONLY at compile time? > Traditional LDFLAGS appear to clearly map to CMAKE_xxx_LINKER_FLAGS, however > CMAKE_CXX_FLAGS work differently from what I would like - they are passed to > both th

Re: [CMake] Disabling -fPIC

2010-10-01 Thread Rolf Eike Beer
Am Friday 01 October 2010 schrieb Marek Szuba: > Hello, > > Recently I have converted a Linux project I work on from hand-crafted make > files to CMake. Everything up to and including installation works fine, > however the resulting binaries cannot be run due to the system on which > this software

Re: [CMake] Build several libraries with different compilation flags

2010-10-01 Thread Ryan Pavlik
Look at the target properties instead of the source file properties. Ryan On 10/01/2010 08:27 AM, pellegrini wrote: Hello everybody, I would like to build two libraries that contain the same files but with a slightly different set of compilation flags from one library to another. This within

[CMake] Separate CXXFLAGS and LDFLAGS

2010-10-01 Thread Marek Szuba
Hello, How can one define C++ compiler flags which are used ONLY at compile time? Traditional LDFLAGS appear to clearly map to CMAKE_xxx_LINKER_FLAGS, however CMAKE_CXX_FLAGS work differently from what I would like - they are passed to both the compiler and the linker. Cheers, -- MS

[CMake] Disabling -fPIC

2010-10-01 Thread Marek Szuba
Hello, Recently I have converted a Linux project I work on from hand-crafted make files to CMake. Everything up to and including installation works fine, however the resulting binaries cannot be run due to the system on which this software runs disallowing text relocations. Having compared how the

[CMake] Build several libraries with different compilation flags

2010-10-01 Thread pellegrini
Hello everybody, I would like to build two libraries that contain the same files but with a slightly different set of compilation flags from one library to another. This within the same makefile. I was thinking about an approach such as: add_library(my_lib1, STATIC, src_files ...) set_source_

Re: [CMake] CMAKE_CXX_FLAGS

2010-10-01 Thread fatman
>> As a total non-expert I don't see how this will work because >> if build type is "Debug" then CMake will use >> CMAKE_CXX_FLAGS_DEBUG not CMAKE_CXX_FLAGS. > >I believe it would use both, however, if you are checking >CMAKE_BUILD_TYPE, then your build system will not work as expected on >multi-c

Re: [CMake] Stopping the VS build when configure fails

2010-10-01 Thread John Drescher
On Fri, Oct 1, 2010 at 2:21 AM, Rolf Eike Beer wrote: > Am Friday 01 October 2010 schrieb John Drescher: >> On Thu, Sep 30, 2010 at 7:47 PM, James Bigler wrote: >> > On Thu, Sep 30, 2010 at 5:42 PM, James Bigler > wrote: >> >> I'm currently using VS 2008 64 bit with CMake 2.6.3. >> > >> > This a

Re: [CMake] CMake Digest, Vol 77, Issue 104

2010-10-01 Thread Ryan Pavlik
On Fri, Oct 1, 2010 at 4:23 AM, David Aldrich wrote: > Hi > >> if(CMAKE_BUILD_TYPE EQUAL Debug) >>    set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings >> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++ >> -Wmain -Wextra) >> else(CMAKE_BUILD_TYPE EQUAL Debug) >>

Re: [CMake] How to set compiler flags?

2010-10-01 Thread David Aldrich
Well I can't argue with that, but I must admit that I have not read CMakeCache.txt ;-) David > -Original Message- > From: Michael Wild [mailto:them...@gmail.com] > Sent: 01 October 2010 11:53 > To: David Aldrich > Cc: fat...@crackmonkey.us; cmake@cmake.org > Subject: Re: [CMake] How to

Re: [CMake] How to set compiler flags?

2010-10-01 Thread Michael Wild
On 1. Oct, 2010, at 12:45 , David Aldrich wrote: > Hi Michael > >> Wrong. CMAKE_CXX_FLAGS is always used, the configuration-specific values are >> appended to it. > > This is where I groan a little. I haven't read that in the online > documentation. > > Best regards > > David Couldn't fin

Re: [CMake] How to set compiler flags?

2010-10-01 Thread David Aldrich
Hi Michael > Wrong. CMAKE_CXX_FLAGS is always used, the configuration-specific values are > appended to it. This is where I groan a little. I haven't read that in the online documentation. Best regards David ___ Powered by www.kitware.com Visit othe

Re: [CMake] How to set compiler flags?

2010-10-01 Thread Michael Wild
On 1. Oct, 2010, at 11:23 , David Aldrich wrote: > Hi > >> if(CMAKE_BUILD_TYPE EQUAL Debug) >> set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings >> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++ >> -Wmain -Wextra) >> else(CMAKE_BUILD_TYPE EQUAL Debug) >> s

Re: [CMake] CMAKE_CXX_FLAGS

2010-10-01 Thread fatman
It let me in more quickly than usual today. Let's look at the IO log. cd cmake && make VERBOSE=1 all && cd .. in dir /home/arichardson/buildbot/Reu2/bin/vostro/build (timeout 1200 secs) watching logfiles {} argv: cd cmake && make VERBOSE=1 all && cd .. [ 2%] Building CXX object SmallTestLib/

[CMake] CMake, precompiled headers, Apple, gcc and Qt

2010-10-01 Thread Dieter Oberkofler
Hi! I'm (once again) struggling with the creation of precompiled headers in conjunction with gcc and Qt on the Apple platform. When creating my precompiled header I use a code section based on "PCHSupport_26.cmake" to extract the compile flags as follows: -- STRING(TOUPPER "CMAKE_CXX_FLAG

[CMake] CMake, precompiled headers, Apple, gcc and Qt

2010-10-01 Thread Dieter Oberkofler
Hi! I'm (once again) struggling with the creation of precompiled headers in conjunction with gcc and Qt on the Apple platform. When creating my precompiled header I use a code section based on "PCHSupport_26.cmake" to extract the compile flags as follows: -- STRING(TOUPPER "CMAKE_CXX_FLAG

Re: [CMake] CMAKE_CXX_FLAGS

2010-10-01 Thread fatman
>>I'll insert that into the builder configuration, >> sighup the buildmaster and force a build. Or at least I will when the server lets me in. It's started doing this odd thing every day where it works until I try and SSH into it, then it goes offline for an hour and when it comes back I can SSH

Re: [CMake] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]

2010-10-01 Thread fatman
>> Could be. I too am a non-expert. CMake doesn't seem to output the >> command lines it executes, or if it does then Buildbot ignores it. This >> is the view from Buildbot's IO log: >> >> >> Can I make CMake more verbose? The IO log above contains the command >> line executed by Buildbot ("cd

Re: [CMake] Error finding boost libraries

2010-10-01 Thread David Aldrich
Hi Actually, I made an error in my CMakeLists.txt file. It's fixed now. Sorry for raising this. Best regards David > -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of > fat...@crackmonkey.us > Sent: 01 October 2010 10:55 > To: David Al

Re: [CMake] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]

2010-10-01 Thread David Aldrich
You can run cmake and then: make VERBOSE=1 to see the flags. Best regards David > -Original Message- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of > fat...@crackmonkey.us > Sent: 01 October 2010 10:48 > To: David Aldrich > Cc: cmake@cmake.org > Subjec

[CMake] Error finding boost libraries

2010-10-01 Thread fatman
> From: David Aldrich > Subject: > To: "cmake@cmake.org" > > The following command is not working for me: > > find_package( Boost 1.40.0 COMPONENTS python REQUIRED ) > > I get error: > > CMake Error at CMakeLists.txt:36 (find_package): > Could not find module FindBoostLibs.cmake or a config

[CMake] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]

2010-10-01 Thread fatman
On Fri, 1 Oct 2010 10:23:30 +0100 David Aldrich wrote: > > if(CMAKE_BUILD_TYPE EQUAL Debug) > >set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings > > -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++ > > -Wmain -Wextra) > > else(CMAKE_BUILD_TYPE EQUAL Debug) >

[CMake] CMake/Buildbot xplat upload?

2010-10-01 Thread fatman
Hi list, I Googled for this but didn't find anything. CMake is integrating well with Buildbot to make a sort of poor-man's build farm. The one thing I can't seem to work out is a crossplatform way to upload CPack-built packages (Windows and Linux) to a web server (Ubuntu). The target web server

Re: [CMake] How to set compiler flags?

2010-10-01 Thread Michael Wild
On 1. Oct, 2010, at 11:17 , fat...@crackmonkey.us wrote: > > On Fri, 1 Oct 2010 11:05:34 +0200 > Michael Wild wrote: >>> >>> if(CMAKE_BUILD_TYPE EQUAL Debug) >>> set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings >>> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -We

Re: [CMake] CMake Digest, Vol 77, Issue 104

2010-10-01 Thread David Aldrich
Hi > if(CMAKE_BUILD_TYPE EQUAL Debug) >set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings > -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++ > -Wmain -Wextra) > else(CMAKE_BUILD_TYPE EQUAL Debug) >set(CMAKE_CXX_FLAGS -s etc) > endif(CMAKE_BUILD_TYPE EQUAL D

Re: [CMake] How to set compiler flags?

2010-10-01 Thread fatman
On Fri, 1 Oct 2010 11:05:34 +0200 Michael Wild wrote: > > > > if(CMAKE_BUILD_TYPE EQUAL Debug) > > set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings > > -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++ > > -Wmain -Wextra) > > else(CMAKE_BUILD_TYPE EQUAL Debug)

Re: [CMake] How to set compiler flags?

2010-10-01 Thread Michael Wild
On 1. Oct, 2010, at 10:50 , fat...@crackmonkey.us wrote: > >> Date: Wed, 29 Sep 2010 03:14:57 +0200 >> From: Michael Hertling >> Subject: Re: [CMake] How to set compiler flags? >> To: cmake@cmake.org >> Message-ID: <4ca29311.1050...@online.de> >> Content-Type: text/plain; charset=ISO-8859-1 >>

Re: [CMake] CMake Digest, Vol 77, Issue 104

2010-10-01 Thread fatman
> Date: Wed, 29 Sep 2010 03:14:57 +0200 > From: Michael Hertling > Subject: Re: [CMake] How to set compiler flags? > To: cmake@cmake.org > Message-ID: <4ca29311.1050...@online.de> > Content-Type: text/plain; charset=ISO-8859-1 > > > [...] So I now use add_definitions instead: > > > > add_defini

[CMake] Error finding boost libraries

2010-10-01 Thread David Aldrich
Hi The following command is not working for me: find_package( Boost 1.40.0 COMPONENTS python REQUIRED ) I get error: CMake Error at CMakeLists.txt:36 (find_package): Could not find module FindBoostLibs.cmake or a configuration file for package BoostLibs. I am running CMake 2.8.2, which con