[CMake] Linux In-the-source Build multiple modes without swithing

Bill Hoffman bill.hoffman at kitware.com
Fri Jun 19 12:47:29 EDT 2009


Charlie Sun wrote:
> Because I would need to run the test using ctest, and the test cases 
> have hard-coded and relative paths configured. If i do an out-of-source 
> build. Some test cases would fail.
> I am also building the project on windows Visual studio, which does not 
> have the problem with in-the-source. it will put object files in 
> different folders (release/debug).
> Therefore, I don't know why it won't work in that way on Linux.
> 

Currently there is no support for multiple configurations in the same 
build directory with the makefiles in CMake.  It would be a significant 
effort to add support.   I would change the hard-coded and relative 
paths that you have in your tests to a configured file.

configure_file(mypaths.h.in mypaths.h)

-Bill


More information about the CMake mailing list