diff options
author | David Cole <david.cole@kitware.com> | 2011-11-08 19:43:02 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-11-08 19:43:02 (GMT) |
commit | 7ee0f580eb9714593b062f8ce6ca190ac50d6cd8 (patch) | |
tree | 026a4dd214559c7e7b5e6858e25b638f60a7dff9 /Source | |
parent | 3452dadf89db0bc6cfc6e80d2caf0b6c7891d120 (diff) | |
parent | 4b930220be0c0b2391a33336a37525154f6b402d (diff) | |
download | CMake-7ee0f580eb9714593b062f8ce6ca190ac50d6cd8.zip CMake-7ee0f580eb9714593b062f8ce6ca190ac50d6cd8.tar.gz CMake-7ee0f580eb9714593b062f8ce6ca190ac50d6cd8.tar.bz2 |
Merge topic 'EclipseWarnIfBuildDirIsSubDirOfSrcDir'
4b93022 Eclipse: warn if CMAKE_BINARY_DIR is subdir of CMAKE_SOURCE_DIR
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 785e85a..0667da7 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -87,6 +87,16 @@ void cmExtraEclipseCDT4Generator::Generate() this->GenerateSourceProject = (this->IsOutOfSourceBuild && mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT")); + if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(), + this->HomeDirectory.c_str())) + { + mf->IssueMessage(cmake::WARNING, "The build directory is a subdirectory " + "of the source directory.\n" + "This is not supported well by Eclipse. It is strongly " + "recommended to use a build directory which is a " + "sibling of the source directory."); + } + // NOTE: This is not good, since it pollutes the source tree. However, // Eclipse doesn't allow CVS/SVN to work when the .project is not in // the cvs/svn root directory. Hence, this is provided as an option. |