[CMake] Separating build from source

2010-05-08 Thread motes motes
I am trying to build an application which use the itk library based on the following structure: code/ code/src code/src/MyItkProject code/build code/build/release code/build/debug CMakeLists.txt I have located my CMakeLists.txt file in the 'code' dir where I specify the necessary includes. I

Re: [CMake] Separating build from source

2010-05-08 Thread motes motes
Solved. Just needed to specify the full path to the .cpp file in the CMakeList.txt file. On Sun, May 9, 2010 at 1:41 AM, motes motes mort.mo...@gmail.com wrote: I am trying to build an application which use the itk library based on the following structure: code/ code/src code/src

[CMake] Pass value from CMake to source file?

2009-10-04 Thread motes motes
Is it possible to send a user specified path from CMake to the final application (make it visible)? Depending on which machine I build my application on the path to some images may vary. I was therefore thinking to specify this path when building with CMake like: FIND_PATH(IMAGE_DIR REQUIRED)

[CMake] Problems with CMake and Boost in Ubuntu 9.04

2009-10-03 Thread motes motes
I am trying to build an application with CMake using Boost and the boost unit-testing framework in Ubuntu 9.04. I have installed boost from synaptic. Here is what I have in my CMakeList.txt file: IF(Boost_unit_test_framework_LIBRARY) GET_FILENAME_COMPONENT(LIB_EXTENSION

[CMake] [100%] Building CXX object, [ 50%] Building CXX ....

2009-10-02 Thread motes motes
I have a few CMake projects in Ubuntu Linux. When I run 'make' it sometime prints: [100%] Building CXX object and other times: [ 50%] Building CXX what does the percentage mean? ___ Powered by www.kitware.com Visit other Kitware

[CMake] 'make' compiles old code ?

2009-09-30 Thread motes motes
I have just created a build folder for an application using ITK with CMake on Ubuntu 9.04. I have then entered the build folder from a terminal and typed 'make'. I then get a list of errors: ... home/mort/lib/compute_metric.h:22: error: expected `;' before ‘transform’

Re: [CMake] 'make' compiles old code ?

2009-09-30 Thread motes motes
Nevermind worked on a wrong copy, it now works! On Wed, Sep 30, 2009 at 1:00 PM, motes motes mort.mo...@gmail.com wrote: I have just created a build folder for an application using ITK with CMake on Ubuntu 9.04. I have then entered the build folder from a terminal and typed 'make'. I

[CMake] Set a variable?

2009-09-22 Thread motes motes
In a CMakeList.txt file I have: SET(ELASTIX_BUILD E:/local/lib/elastix_sources_v4.1/src/build) ... LINK_DIRECTORIES(${ELASTIX_BUILD}/Components/Optimizers/StandardGradientDescent) I would to be able to specify the variable: ELASTIX_BUILD when I read the CMakeList.txt file and then choose it

Re: [CMake] Set a variable?

2009-09-22 Thread motes motes
On Tue, Sep 22, 2009 at 3:55 PM, James C. Sutherland james.sutherl...@utah.edu wrote: On Sep 22, 2009, at 6:16 AM, motes motes wrote: In a CMakeList.txt file I have: SET(ELASTIX_BUILD E:/local/lib/elastix_sources_v4.1/src/build) ... LINK_DIRECTORIES(${ELASTIX_BUILD}/Components/Optimizers

[CMake] Using boost with cmake?

2009-09-19 Thread motes motes
I have just installed boost for windows: http://www.boostpro.com/download Now I would like to use the boost unit-testing framework in my application that I build with cmake. Any but how do I add the boost unit testing framework to my current CMakeLists.txt file?

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

2009-09-15 Thread motes motes
, Eric Noulard eric.noul...@gmail.com wrote: 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

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

2009-09-14 Thread motes motes
I would like to create a Release and Debug Build for my source files. Currently I have been able to make both build types separately but it would be nice to not have duplicated source files. My source files depends on ITK and Elastix. I have therefore made both a Debug and Release build for ITK

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

2009-09-14 Thread motes motes
CMakeList.txt files, but I still need to build my project with CMake (and replace the correct CMakeList.txt file) each time I will change from Debug to Release or the other way around. On Mon, Sep 14, 2009 at 10:37 PM, Eric Noulard eric.noul...@gmail.com wrote: 2009/9/14 motes motes mort.mo

[CMake] LINK_DIRECTORIES ?

2009-08-05 Thread motes motes
I get the point of INCLUDE_DIRECTORIES (the various files used must be located). But what is the point of LINK_DIRECTORIES and TARGET_LINK_LIBRARIES? In a CMakeLists.txt file I have: .. INCLUDE_DIRECTORIES(${ELASTIX_SRC}/Components/Optimizers/StandardGradientDescent) ... ...

[CMake] How to use FIND_PACKAGE(xxx) ?

2009-08-01 Thread motes motes
I am building an application with cmake that depends on the Elastix library: http://elastix.isi.uu.nl/about.php I have already build Elastix. I am trying to do the following in a CMakeLists.txt file:

Re: [CMake] How to use FIND_PACKAGE(xxx) ?

2009-08-01 Thread motes motes
Yeah I realized that it does not exists for Elastix, but it exists for ITK though. Maybe the Elastix developer will include it in a future release. On Sun, Aug 2, 2009 at 12:29 AM, alexis lameire alexisis-pristont...@hotmail.com wrote: -- Date: Sun, 2 Aug 2009

[CMake] Setting up a folder structure?

2009-07-18 Thread motes motes
I am setting up a new project that I need to build with cmake. It has the following structure: /lib /registration /registration/typeA /registration/typeB /validation 1) In /registration/typeA I need a main file to run the typeA application. 2) In /registration/typeB I need a main file to

[CMake] LINK : fatal error LNK1104: cannot open file 'z.lib'

2009-06-06 Thread motes motes
I use cmake to create makefiles for a C++ project. One of the target links is just called 'z': TARGET_LINK_LIBRARIES(z ... When I try to compile the code (Visual Studio 2008) I get: LINK : fatal error LNK1104: cannot open file 'z.lib' I have tried to download zlib for windows and point to the

[CMake] Convert unix c++ compiler flags to windows compiler flags?

2009-06-04 Thread motes motes
I have these compiler flags in a CMakeList.txt file for some linux code: SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -w -lX11 -Dcimg_use_xshm -lXext -Dcimg_use_xrandr -lXrandr -O3 -fpermissive -march=nocona -m64 -ffast-math -funroll-loops -finline-functions) Any ideas on who I convert those to