Browse Source

BUG: INCLUDE_DIRECTORIES should interpret relative path arguments with respect to the current source directory.

pull/1/head
Brad King 20 years ago
parent
commit
21089bf93f
  1. 7
      Source/cmIncludeDirectoryCommand.cxx
  2. 2
      Tests/Complex/CMakeLists.txt
  3. 2
      Tests/ComplexOneConfig/CMakeLists.txt
  4. 2
      Tests/ComplexRelativePaths/CMakeLists.txt

7
Source/cmIncludeDirectoryCommand.cxx

@ -49,6 +49,13 @@ bool cmIncludeDirectoryCommand
}
std::string unixPath = *i;
cmSystemTools::ConvertToUnixSlashes(unixPath);
if(!cmSystemTools::FileIsFullPath(unixPath.c_str()))
{
std::string tmp = this->Makefile->GetStartDirectory();
tmp += "/";
tmp += unixPath;
unixPath = tmp;
}
this->Makefile->AddIncludeDirectory(unixPath.c_str(), before);
}
return true;

2
Tests/Complex/CMakeLists.txt

@ -92,7 +92,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar)
# (BEFORE is for coverage)
#
INCLUDE_DIRECTORIES(
${Complex_SOURCE_DIR}/Library
Library
${Complex_SOURCE_DIR}/../../Source
${Complex_BINARY_DIR}/../../Source
)

2
Tests/ComplexOneConfig/CMakeLists.txt

@ -92,7 +92,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar)
# (BEFORE is for coverage)
#
INCLUDE_DIRECTORIES(
${Complex_SOURCE_DIR}/Library
Library
${Complex_SOURCE_DIR}/../../Source
${Complex_BINARY_DIR}/../../Source
)

2
Tests/ComplexRelativePaths/CMakeLists.txt

@ -92,7 +92,7 @@ ENDIF(${fooCACHE_TEST_VAR2} MATCHES bar)
# (BEFORE is for coverage)
#
INCLUDE_DIRECTORIES(
${Complex_SOURCE_DIR}/Library
Library
${Complex_SOURCE_DIR}/../../Source
${Complex_BINARY_DIR}/../../Source
)

Loading…
Cancel
Save