2009/9/14 motes motes <mort.mo...@gmail.com>:
> 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 and Elastix.
>
> Now in my source folder I need to create two CMakelist.txt files. One
> that uses the ITK and Elastix Release build and another that uses the
> Debug builds. But how do I make CMake use the right CMakeList.txt
> file?

You should use

1) the debug/optimized etc... flags from
    target_link_libraries

2) may be some IF(CMAKE_BUILD_TYPE STREQUAL "Debug") etc...

If you post here an example of what is different in your currently
separated CMakeLists.txt files we could help you with more
expressive example.

You may browse the ML archive for thread talking about "build type"
like may be this one:
http://www.cmake.org/pipermail/cmake/2007-April/013479.html

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
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 the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to