MantisBT - CMake
View Issue Details
0011343CMakeCMakepublic2010-10-20 15:352011-04-04 12:00
kentwilliams 
Brad King 
normalfeaturealways
closedduplicate 
CMake-2-8 
CMake 2.8.4 
0011343: A built-in facility to disallow in-source builds would be a useful feature
It is possible (and it is done on multiple projects) to disallow configuring a source tree as a build directory. The only problem is that testing for CMAKE_CURRENT_SOURCE_DIR != CMAKE_CURRENT_BINARY_DIR doesn't happen before CMake creates the CMakeCache.txt file and CMakeFiles directory.

This is a problem because if CMake detects its own config/build files in a source directory, it will act as though it has configured an out-of-source build directory, but a build in the out-of-source directory will fail.

What's needed is a 'magic' option to disallow out of source builds, that will get checked before creating any files in the source directory.
No tags attached.
duplicate of 0006672closed Kitware Robot Detect In-Source build BEFORE creating CMakeCache.txt 
Issue History
2010-10-20 15:35kentwilliamsNew Issue
2010-10-21 09:26Eric NOULARDRelationship addedduplicate of 0006672
2010-12-14 19:05David ColeAssigned To => Brad King
2010-12-14 19:05David ColeStatusnew => assigned
2010-12-14 19:06David ColeNote Added: 0024124
2010-12-14 19:06David ColeStatusassigned => resolved
2010-12-14 19:06David ColeFixed in Version => CMake 2.8.4
2010-12-14 19:06David ColeResolutionopen => duplicate
2011-04-04 12:00David ColeNote Added: 0026048
2011-04-04 12:00David ColeStatusresolved => closed

Notes
(0024124)
David Cole   
2010-12-14 19:06   
Monitor the duplicate bug id if you want to know when it gets fixed.
(0026048)
David Cole   
2011-04-04 12:00   
Closing resolved issues that have not been updated in more than 3 months.