ENH: Enabling CMAKE_INCLUDE_CURRENT_DIR even for in-source builds to be more consistent with its name. This also makes double-quote and angle-bracket include styles (almost) identical.

This commit is contained in:
Brad King 2006-03-21 08:45:57 -05:00
parent b29c26eb3f
commit bcfca6e1c1

View File

@ -872,17 +872,14 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs)
bool includeSourceDir = false; bool includeSourceDir = false;
bool includeBinaryDir = false; bool includeBinaryDir = false;
// When automatic include directories are requested for an // When automatic include directories are requested for a build then
// out-of-source build then include the source and binary // include the source and binary directories at the beginning of the
// directories at the beginning of the include path to approximate // include path to approximate include file behavior for an
// include file behavior for an in-source build. This does not // in-source build. This does not account for the case of a source
// account for the case of a source file in a subdirectory of the // file in a subdirectory of the current source directory but we
// current source directory but we cannot fix this because not all // cannot fix this because not all native build tools support
// native build tools support per-source-file include paths. // per-source-file include paths.
bool inSource = if(this->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR"))
cmSystemTools::ComparePath(this->Makefile->GetStartDirectory(),
this->Makefile->GetStartOutputDirectory());
if(!inSource && this->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR"))
{ {
includeSourceDir = true; includeSourceDir = true;
includeBinaryDir = true; includeBinaryDir = true;