[CMake] CMake --debug-trycompile option breaking tests

Bill Hoffman bill.hoffman at kitware.com
Wed Aug 31 14:14:20 EDT 2011


On 8/30/2011 4:13 PM, Clifford Yapp wrote:
> Hmm.  What about changing that option to make one sub-directory per
> test instead of doing each one in the same temp directory?  Or if
> try_compile doesn't support that, moving the generated files to a
> subdirectory after the try_compile proper has run?  That would allow
> "normal" cmake building while still preserving the files - it's rather
> unexpected behavior to have it do what it does now.  Is there a reason
> not to have one directory per test in a "try_compile" subdirectory?
>
> Cheers,
> CY
>
It would make a mess if you created a sub-dir per test.  There would be 
lots and lots of sub-dirs in some projects.  Moving the files would not 
work because after you move them they would not work correctly and you 
would not be able to try the build out.   If you want to hack around and 
see if you can get some sort of patch that works with ITK/KDE and some 
other larger projects, I would review the patch. :)

Basically, it is a hard problem.

-Bill


More information about the CMake mailing list