In my CMakeLists.txt, i use such things like:

FIND_LIBRARY(LIB_UMFPACK LIB_UMFPACK /opt/UMFPACK5.0.3/build/linux_eclipse/LIB_UMFPACK/${CMAKE_BUILD_TYPE})

So when i run:
cmake -DCMAKE_BUILD_TYPE=Debug

in my CMakeCache.txt, i find

//Path to a library.
LIB_UMFPACK:FILEPATH=/opt/UMFPACK5.0.3/build/linux_eclipse/LIB_UMFPACK/Debug/libLIB_UMFPACK.a

When i try to do:
cmake -DCMAKE_BUILD_TYPE=Release

in my CMakeCache.txt, i still  find libLIB_UMFPACK.a on Debug Mode:
//Path to a library.
LIB_UMFPACK:FILEPATH=/opt/UMFPACK5.0.3/build/linux_eclipse/LIB_UMFPACK/Debug/libLIB_UMFPACK.a

if i remove CMakeCache.txt:
rm CMakeCache.txt

and i try
cmake -DCMAKE_BUILD_TYPE=Release

I found the good mode ... So, my question is the following one:
is there a way (command line, configuration of CMakeLists.txt, ...) to force reloading my CMakeCache.txt, it appears that making Out-Source-Build with some directories such Debug or Release works because configurations have their own CMakeCache.txt, i dont want this solution because i would like to type in the same directory:
cmake -DCMAKE_BUILD_TYPE=Debug
or
cmake -DCMAKE_BUILD_TYPE=Release

Thank you very much for your help.


_______________________________________________
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