Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Marcel Loose
Hi Pierre-Julien, You are right. You don't need add_dependencies() when specifying link dependencies using target_link_libraries(). The latter, BTW, is of course the preferred way to do this. Without an example of you CMakeLists.txt files, it's very hard to tell what, if anything, is going

Re: [CMake] Release and Debug build for same source folder?

2009-09-15 Thread Eric Noulard
2009/9/14 motes motes mort.mo...@gmail.com: This is the CmakeList.txt for the Debug build: [...] # Find ITK. SET(ITK_DIR ${EXTERNALS_DIR}/InsightToolkit-3.12.0/build) # Elastix build SET(ELASTIX_BUILD ${EXTERNALS_DIR}/elastix_sources_v4.1/src/build) [...] The CMakeList.txt for the

Re: [CMake] Problems with CMake on 64-bit Vista

2009-09-15 Thread Tanguy Krotoff
On Mon, Sep 14, 2009 at 3:51 PM, Bill Hoffman bill.hoff...@kitware.com wrote: Tanguy Krotoff wrote: Still why try_run() works in debug mode instead of release mode? Why not debug?  It is the default build. humm why not in release mode (or release with debug info)? smaller exe, faster, and I

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Pierre-Julien Villoud
I found my problem Here are 2 CMakeLists.txt : === CMakeLists.txt : libMaths : #Minimum Cmake version required cmake_minimum_required(VERSION 2.6) add_library(Maths MathFuncsLib.cpp ) ===

Re: [CMake] Release and Debug build for same source folder?

2009-09-15 Thread motes motes
I build the Debug and Release build the same way with cmake. Its first when I open the .snl project in Visual Studio 2008 that I choose to build it either with Release or Debug mode. But as I understand your mail I have to move this responsibility to cmake? On Tue, Sep 15, 2009 at 9:53 AM,

Re: [CMake] Release and Debug build for same source folder?

2009-09-15 Thread Eric Noulard
2009/9/15 motes motes mort.mo...@gmail.com: I build the Debug and Release build the same way with cmake. Its first when I open the .snl project in Visual Studio 2008 that I choose to build it either with Release or Debug mode. But as I understand your mail I have to move this responsibility

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Pierre-Julien Villoud
Here is another problem I'm facing with the previous example : If I do this : In C:\Maths : Cmake -GMinGW Makefiles -DCMAKE_BUILD_TYPE=Release make = builds libMaths And after : In C:\HelloMath (assuming the cmake has been called before Maths build : make = fails with the following

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Marcel Loose
Aah, I see now what the problem really is. You're building in two different directories. So, you will end up with two versions of libMaths. That exactly explains the output you're seeing. * First, in directory Maths, you're building libMaths. * Next, in directory HelloMath, you're building both

Re: [CMake] add_subdirectory and build directory

2009-09-15 Thread Pierre-Julien Villoud
Actually I'm not building in two different directories since I specified the bin dir argument in the add_subdirectory which is pointing to the same directory C:\Maths. Best Regards Pierre-Julien -Message d'origine- De : Marcel Loose [mailto:lo...@astron.nl] Envoyé : mardi 15

Re: [CMake] check_include_files() can't find header because it can't compile test app

2009-09-15 Thread Alexander Neundorf
On Tuesday 15 September 2009, Casey Jones wrote: On Monday 14 September 2009 3:22:14 pm Alexander Neundorf wrote: On Sunday 13 September 2009, Casey Jones wrote: Hello, I'm trying to link a Qt4 library into my program as an optional dependency. I can get it to find and link the library

[CMake] VTK with QT options: VTK_USE_QVTK not ava ilable

2009-09-15 Thread Nicolas RANNOU
Hello, I'm working with ubuntu 9.04 I compiled QT(4.5.2) doing ./configure, make, make install. Then I downloaded cmake (2.6.4) : sudo apt-get install cmake Now I downloaded the sources of VTK(5.4.2) and VTK Data and I want to compile it. I want to use VTK with QT. so I go in the folder where

Re: [CMake] VTK with QT options: VTK_USE_QVTK not available

2009-09-15 Thread Clinton Stimpson
I just responded on the VTK list about your issues. Clint On Tuesday 15 September 2009 11:05:33 am Nicolas RANNOU wrote: Hello, I'm working with ubuntu 9.04 I compiled QT(4.5.2) doing ./configure, make, make install. Then I downloaded cmake (2.6.4) : sudo apt-get install cmake Now I

Re: [CMake] VTK with QT options: VTK_USE_QVTK not available

2009-09-15 Thread John Drescher
I'm working with ubuntu 9.04 I compiled QT(4.5.2) doing ./configure, make, make install. Then I downloaded cmake (2.6.4) : sudo apt-get install cmake Now I downloaded the sources of VTK(5.4.2) and VTK Data and I want to compile it. I want to use VTK with QT. so I go in the folder where I

Re: [CMake] Eclipse generator - basic macros

2009-09-15 Thread Alexander Neundorf
On Wednesday 15 July 2009, Miguel A. Figueroa-Villanueva wrote: On Tue, Jul 14, 2009 at 7:46 PM, Benjamin Schindler wrote: Miguel A. Figueroa-Villanueva wrote: Just to be clear... If you have compiler dependent code: #if defined(_MSC_VER) ... #elif defined(__GNUC__) ... #else

[CMake] is ccmake reliable?

2009-09-15 Thread James C. Sutherland
On another mailing list that I subscribe to someone mentioned that ccmake was not very reliable. Is this true? A related question: If I set CMAKE_INSTALL_PREFIX in my CMakeLists.txt file set( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} ) and then run ccmake, I find that the

Re: [CMake] is ccmake reliable?

2009-09-15 Thread David Cole
I believe the word used was reproducible not reliable -- and I think he was talking about the fact that it is not reproducible because it depends on human interaction. Other than the human sitting at the keyboard, I have found ccmake (and *all* of the cmake executables) to be quite reliable. The

Re: [CMake] is ccmake reliable?

2009-09-15 Thread Tyler Roscoe
On Tue, Sep 15, 2009 at 12:37:27PM -0600, James C. Sutherland wrote: A related question: If I set CMAKE_INSTALL_PREFIX in my CMakeLists.txt file set( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} ) and then run ccmake, I find that the CMAKE_INSTALL_PREFIX variable is set to

Re: [CMake] is ccmake reliable?

2009-09-15 Thread James C. Sutherland
On Sep 15, 2009, at 12:50 PM, David Cole wrote: I believe the word used was reproducible not reliable -- and I think he was talking about the fact that it is not reproducible because it depends on human interaction. Other than the human sitting at the keyboard, I have found ccmake (and

Re: [CMake] is ccmake reliable?

2009-09-15 Thread John Drescher
So assuming that I wanted my CMakeLists.txt file to modify the default install location, but allow the user to change this, wouldn't I do something like: set( CMAKE_INSTALL_PREFIX  ${CMAKE_CURRENT_BINARY_DIR}  CACHE PATH installation path  ) This doesn't work - I assume that this is

Re: [CMake] is ccmake reliable?

2009-09-15 Thread Tyler Roscoe
On Tue, Sep 15, 2009 at 02:08:44PM -0600, James C. Sutherland wrote: So assuming that I wanted my CMakeLists.txt file to modify the default install location, but allow the user to change this, wouldn't I do something like: set( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} CACHE

Re: [CMake] is ccmake reliable?

2009-09-15 Thread James C. Sutherland
On Sep 15, 2009, at 2:15 PM, Tyler Roscoe wrote: On Tue, Sep 15, 2009 at 02:08:44PM -0600, James C. Sutherland wrote: So assuming that I wanted my CMakeLists.txt file to modify the default install location, but allow the user to change this, wouldn't I do something like: set(

Re: [CMake] is ccmake reliable?

2009-09-15 Thread James C. Sutherland
On Sep 15, 2009, at 12:59 PM, Tyler Roscoe wrote: On Tue, Sep 15, 2009 at 12:37:27PM -0600, James C. Sutherland wrote: A related question: If I set CMAKE_INSTALL_PREFIX in my CMakeLists.txt file set( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} ) and then run ccmake, I find that the

Re: [CMake] is ccmake reliable?

2009-09-15 Thread Tyler Roscoe
On Tue, Sep 15, 2009 at 02:20:35PM -0600, James C. Sutherland wrote: set( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH installation path ) This doesn't work - I assume that this is because CMAKE_INSTALL_PREFIX is a special (internally defined) variable? When I run ccmake

Re: [CMake] is ccmake reliable?

2009-09-15 Thread John Drescher
Looks like the default for CMAKE_INSTALL_PREFIX comes from CMakeGenericSystem.cmake: # Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX # was initialized by the block below.  This is useful for user # projects to change the default prefix while still allowing the #

Re: [CMake] check_include_files() can't find header because it can't compile test app

2009-09-15 Thread Casey Jones
On Tuesday 15 September 2009 11:43:04 am Alexander Neundorf wrote: On Tuesday 15 September 2009, Casey Jones wrote: On Monday 14 September 2009 3:22:14 pm Alexander Neundorf wrote: On Sunday 13 September 2009, Casey Jones wrote: Hello, I'm trying to link a Qt4 library into my program as

Re: [CMake] is ccmake reliable?

2009-09-15 Thread James C. Sutherland
On Sep 15, 2009, at 2:47 PM, Tyler Roscoe wrote: On Tue, Sep 15, 2009 at 02:20:35PM -0600, James C. Sutherland wrote: set( CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH installation path ) This doesn't work - I assume that this is because CMAKE_INSTALL_PREFIX is a special