[CMake] include directories getting excaped.

2009-06-22 Thread chris
Hi, I've got this bit of cmake code: PKG_CHECK_MODULES(GTKMM gtkmm-2.4 REQUIRED) IF(NOT GTKMM_FOUND) MESSAGE("GTKMM is required to compile this project." FATAL_ERROR) ENDIF(NOT GTKMM_FOUND) MESSAGE("gtkmm headers: ${GTKMM_INCLUDE_DIRS}") and the message I get under windows is: C:/Program and no

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] Linux In-the-source Build multiple modes without swithing

2009-06-22 Thread Jesper Eskilson
Bill Hoffman wrote: Charlie Sun wrote: Hi, I'm trying to do a linux build with both release and debug mode. In stead of builing out of source as indicated on the FAQ 4.15, I really need to do in the source build. currently, if I do a release build and then a debug build and then another rele

[CMake] Cannot compile simple example using cmake and xcode (linker problem)

2009-06-22 Thread Pim Schellart
Hello Everyone, I would like to compile a cmake project using Xcode. But compiling even a simple test project fails on my system. I tried to compile the example using standard make (with cmake generated Makefiles) and it works. But if I generate an Xcode project using cmake -G Xcode, open this pro

[CMake] How to get different compiler flags Two projects in one solution

2009-06-22 Thread ariasgore
-- GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und Telefonanschluss für nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02 ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opens

[CMake] How to set different compiler flags for two projects in one solution

2009-06-22 Thread ariasgore
Hello, I have two projects in my solution where Project B depends on Project A. Unfortunately Project B requires completely different properties. I know that I can use SET_TARGET_PROPERTIES to add my specific compiler and linker flags but how can I remove specific compiler and linker flags for o

Re: [CMake] Linux In-the-source Build multiple modes without swithing

2009-06-22 Thread Bill Hoffman
Jesper Eskilson wrote: - Be able to do "make {Debug|Release|...}". - Be able to use the same infrastructure for running cmake both on Unix and Windows. I currently have to maintain two different ways of running cmake: one for single-config build directories, and another for multiple-config bu

Re: [CMake] Cmake C compiler detection broken in some cases

2009-06-22 Thread Bill Hoffman
Hendrik Sattler wrote: Am Montag 22 Juni 2009 07:54:38 schrieb Hendrik Sattler: Same game for C++ compiler. I must correct myself: work for C++. \ $ cvs commit -m "BUG: remove warning in test of compiler so -Werror does not fail" CMakeTestCCompiler.cmake Committer: Bill Hoffman /cvsroot/

[CMake] Eclipse CDT 4 generator problems

2009-06-22 Thread Robert Bielik
I'm using cmake 2.6-patch 3 on Ubuntu (64bit 8.04) to generate an Eclipse project, that part works fine... I think. Problem is that when I try to import the project into Eclipse workspace, it takes *forever*. It has run now for 20 minutes+ with a 100% CPU load. When can I expect it to finish

Re: [CMake] include directories getting excaped.

2009-06-22 Thread Tyler Roscoe
On Mon, Jun 22, 2009 at 02:25:17AM -0500, ch...@basementcode.com wrote: > I've got this bit of cmake code: > PKG_CHECK_MODULES(GTKMM gtkmm-2.4 REQUIRED) > IF(NOT GTKMM_FOUND) > MESSAGE("GTKMM is required to compile this project." FATAL_ERROR) > ENDIF(NOT GTKMM_FOUND) > MESSAGE("gtkmm headers: ${G

Re: [CMake] Removing files from a globbed list

2009-06-22 Thread Adolfo Rodríguez
On Mon, Jun 22, 2009 at 4:43 PM, James C. Sutherland < james.sutherl...@utah.edu> wrote: > I am trying to add most files from a directory to a variable. I first > glob the source files, and then want to remove the unwanted files from > the resulting string. Here is what I have: > > set( empty "

[CMake] Removing files from a globbed list

2009-06-22 Thread James C. Sutherland
I am trying to add most files from a directory to a variable. I first glob the source files, and then want to remove the unwanted files from the resulting string. Here is what I have: set( empty "" ) file( GLOB f90_src src/*.f90 ) string( REPLACE ${PROJECT_SOURCE_DIR}/src/ark_m.f90

[CMake] Automating configure and generate?

2009-06-22 Thread David Doria
Is there a way to automatically (in a bash script, for example) configure and generate using defaults from a CMakeLists.txt file? That is, automate doing the following: ccmake ../CMakeLists.txt press 'c' twice press 'g' Thanks, David ___ Powered by www

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] Automating configure and generate?

2009-06-22 Thread Michael Jackson
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/mylocation -DMyCMakeValue=SomeOtherValue ../ is one way to do it. _ Mike Jackson mike.jack...@bluequartz.net BlueQuartz Softwarewww.bluequar

Re: [CMake] Cannot compile simple example using cmake and xcode (linker problem)

2009-06-22 Thread Tyler Roscoe
On Mon, Jun 22, 2009 at 12:08:22PM +0200, Pim Schellart wrote: > I tried to compile the example using standard make (with cmake > generated Makefiles) and it works. > But if I generate an Xcode project using cmake -G Xcode, open this > project and click build I get build failed with the following e

[CMake] Set default build type in CMakeLists.txt

2009-06-22 Thread David Doria
I thought I could set the default build type with the following: SET(CMAKE_BUILD_TYPE debug) PROJECT(Test) ADD_EXECUTABLE(Test Test.cpp) However, when I run ccmake and then press 'c', the CMAKE_BUILD_TYPE field is still empty. Is it set and just not showing up? Or has it not been set properly? T

Re: [CMake] Automating configure and generate?

2009-06-22 Thread David Doria
On Mon, Jun 22, 2009 at 11:49 AM, Phil Smith wrote: > I don’t use ccmake, but wouldn’t just *cmake* followed by *make* do what > you want? That’s what we do (wrapped in a ton of other stuff that cleans up > the environment etc., but essentially it comes down to just those two > commands). > > >

Re: [CMake] How to set different compiler flags for two projects in one solution

2009-06-22 Thread Tyler Roscoe
On Mon, Jun 22, 2009 at 01:11:25PM +0200, ariasg...@gmx.de wrote: > I have two projects in my solution where Project B depends on Project A. > Unfortunately Project B requires completely different properties. I > know that I can use SET_TARGET_PROPERTIES to add my specific compiler > and linker fla

Re: [CMake] Set default build type in CMakeLists.txt

2009-06-22 Thread Tyler Roscoe
On Mon, Jun 22, 2009 at 11:42:34AM -0400, David Doria wrote: > I thought I could set the default build type with the following: > > SET(CMAKE_BUILD_TYPE debug) > PROJECT(Test) > ADD_EXECUTABLE(Test Test.cpp) > > However, when I run ccmake and then press 'c', the CMAKE_BUILD_TYPE field is > still

[CMake] Why does Cmake never add libs when it comes to static linking?

2009-06-22 Thread ariasgore
Hello, I have some code that uses some libs in the following defined vars: # - # Add everything into executable # - ADD_LIBRARY(${PROJECTNAME1} ${sources}

Re: [CMake] Set default build type in CMakeLists.txt

2009-06-22 Thread James Bigler
On Mon, Jun 22, 2009 at 9:54 AM, Tyler Roscoe wrote: > > On Mon, Jun 22, 2009 at 11:42:34AM -0400, David Doria wrote: > > I thought I could set the default build type with the following: > > > > SET(CMAKE_BUILD_TYPE debug) > > PROJECT(Test) > > ADD_EXECUTABLE(Test Test.cpp) > > > > However, when I

Re: [CMake] Why does Cmake never add libs when it comes to static linking?

2009-06-22 Thread Tyler Roscoe
On Mon, Jun 22, 2009 at 05:56:32PM +0200, ariasg...@gmx.de wrote: > # > # Link libraries > # > TARGET_LINK_LIBRARIES ( ${PROJECTNAME1} >

Re: [CMake] Automating configure and generate?

2009-06-22 Thread Phil Smith
I don't use ccmake, but wouldn't just cmake followed by make do what you want? That's what we do (wrapped in a ton of other stuff that cleans up the environment etc., but essentially it comes down to just those two commands). ...phsiii From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.or

Re: [CMake] Why does Cmake never add libs when it comes to static linking?

2009-06-22 Thread Bill Hoffman
ariasg...@gmx.de wrote: Hello, I have some code that uses some libs in the following defined vars: # - # Add everything into executable # - ADD_LIBRARY(

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] Set default build type in CMakeLists.txt

2009-06-22 Thread David Doria
You may also need to use FORCE: > > if(NOT CMAKE_BUILD_TYPE) > set(CMAKE_BUILD_TYPE "Release" CACHE STRING > "Choose the type of build, options are: Debug Release > RelWithDebInfo MinSizeRel." > FORCE) > endif(NOT CMAKE_BUILD_TYPE) > > James >

Re: [CMake] How to set different compiler flags for two projects in one solution

2009-06-22 Thread Tyler Roscoe
Remember to reply to the list. On Mon, Jun 22, 2009 at 05:58:40PM +0200, ariasg...@gmx.de wrote: > > I would use get_target_properties(), followed by string(REPLACE ...), > > followed by set_target_properties(). Will that strategy work for you? > > This works indeed, but it is somehow hacky since

[CMake] Submitting a FindFortran Module for mixed C/Fortran code

2009-06-22 Thread Will Dicharry
Hi All, I spoke with Bill Hoffman at a conference last week, and he mentioned that Kitware is currently working on a module to correctly find the Fortran runtime libraries. I have written such a module, and if you are interested (or haven't finished your own already), I'd like to submit mine

Re: [CMake] Submitting a FindFortran Module for mixed C/Fortran code

2009-06-22 Thread Clinton Stimpson
So does this also include C/Fortran libraries such as g2c and gfortran? Clint Will Dicharry wrote: Hi All, I spoke with Bill Hoffman at a conference last week, and he mentioned that Kitware is currently working on a module to correctly find the Fortran runtime libraries. I have written suc

[CMake] CMake can't find sys/types.h

2009-06-22 Thread Michael Leong
I'm running CMake 2.6.4 on CentOS 4, just upgraded from CMake 2.4. All of a sudden, it can't find sys/types.h, despite it being right there in /usr/include. Is there some variable or something I can check or set to ensure it looks in the right place? _

Re: [CMake] Submitting a FindFortran Module for mixed C/Fortran code

2009-06-22 Thread Brad King
Will Dicharry wrote: I spoke with Bill Hoffman at a conference last week, and he mentioned that Kitware is currently working on a module to correctly find the Fortran runtime libraries. I have written such a module, and if you are interested (or haven't finished your own already), I'd like to

Re: [CMake] Eclipse CDT 4 generator problems

2009-06-22 Thread Eric Noulard
2009/6/22 Robert Bielik : > I'm using cmake 2.6-patch 3 on Ubuntu (64bit 8.04) to generate an Eclipse > project, that part works fine... I think. > > Problem is that when I try to import the project into Eclipse workspace, it > takes *forever*. It has run now for > 20 minutes+ with a 100% CPU load.

Re: [CMake] #cmakedefine and the #if vs #ifdef argument

2009-06-22 Thread Michael Wild
On 18. Jun, 2009, at 21:25, Alexander Neundorf wrote: On Thursday 18 June 2009, Michael Wild wrote: On 17. Jun, 2009, at 23:27, Alexander Neundorf wrote: On Thursday 11 June 2009, Hostile Fork wrote: Hello list! As a learning exercise, I am adding CMake and CTest to a small open- source

Re: [CMake] Submitting a FindFortran Module for mixed C/Fortran code

2009-06-22 Thread Will Dicharry
Brad King wrote: Will Dicharry wrote: I spoke with Bill Hoffman at a conference last week, and he mentioned that Kitware is currently working on a module to correctly find the Fortran runtime libraries. I have written such a module, and if you are interested (or haven't finished your own alre

Re: [CMake] Submitting a FindFortran Module for mixed C/Fortran code

2009-06-22 Thread Brad King
Will Dicharry wrote: Thanks, it is issue ID 0009195. The attached module is FindFortran.cmake. I didn't mention in my earlier message that the module has also been tested on a Cray XT4 running CNL/PGI. Thanks, I've assigned the issue to myself: http://www.cmake.org/Bug/view.php?id=9195 I'

Re: [CMake] include directories getting excaped.

2009-06-22 Thread Christopher Harvey
wowI typed that at 2:25am last night. so many typos I actually found out what's going on. It's not cmakes fault, pkg-config under windows is returning that exact same string, but I didn't notice because --cflags looked alright. when using --cflags-only-I I get the C:\Program thing. Maybe I'll

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] Cross-compiling with FindQt4.cmake

2009-06-22 Thread Alexander Neundorf
On Friday 19 June 2009, Hendrik Sattler wrote: > Hi, > > FindQt4 seems to _completely_ fail for cross-compiling as it depends on > running qmake. As it finds the hosts qmake executable, all it gets is wrong > information. yes, it queries qmake, and since qmake must run on the build host, this will

Re: [CMake] Removing files from a globbed list

2009-06-22 Thread Alexander Neundorf
On Monday 22 June 2009, James C. Sutherland wrote: > I am trying to add most files from a directory to a variable. I first > glob the source files, and then want to remove the unwanted files from > the resulting string. Really, don't do that. Just add all files you want to compile explicitely t

[CMake] How to define a global scope variable ?

2009-06-22 Thread Xiangyun Kong
How could I define a global scoped variable in CMAKE, so that I could use something like, set (global_name ${global_name} {files}) to collect all files in each sub-catogory recursively ? It seems I could only use PARENT_SCOPE to make the parent directory aware of the variable. Thanks for

Re: [CMake] How to define a global scope variable ?

2009-06-22 Thread Andy Lego
Hi, set(global_name value CACHE INTERNAL FORCE) Andy On Mon, Jun 22, 2009 at 6:35 PM, Xiangyun Kong wrote: > > > How could I define a global scoped variable in CMAKE, so that I could use > something like, > >set (global_name ${global_name} {files}) > > to collect all files in each sub-cato

Re: [CMake] How to define a global scope variable ?

2009-06-22 Thread Tyler Roscoe
On Mon, Jun 22, 2009 at 09:13:17PM -0700, Andy Lego wrote: > set(global_name value CACHE INTERNAL FORCE) I've also heard some people use environment variables (they don't persist beyond CMake IIRC) -- set (ENV{global_name} value). tyler ___ Powered by w