El 10/06/16 a las 13:57, Sergey Spiridonov escribió:
I do release build, but I want single source file to be compiled in
debug mode, with "-O0 -DDEBUG" options instead of "-O3".

Of course, without recompiling whole directory.

Oh, I see. In perspective, Windows, for example, does not allow mixing debug and non debug builds. I am afraid cmake cannot do what you want. But you may be able to do it with a wrapper bash script. The idea would be to have two CMakeCache.txt files (one debug, one release) and a CMakeFiles directory. Once you want to compile a single file in a directory, you'd rename the debug CMakeCache.txt file and run cmake/make.
I'll let others chime in with more elegant solutions.

--
Gonzalo GarramuƱo
[email protected]

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to