summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-05-12 14:54:09 (GMT)
committerBrad King <brad.king@kitware.com>2006-05-12 14:54:09 (GMT)
commit21089bf93f877b697874b0858d18915b2d695e20 (patch)
tree1c46505f521f847df658087338f795caaceed1f5
parent01c25dd37815e6316a72c249e190e7891f95d2fa (diff)
downloadCMake-21089bf93f877b697874b0858d18915b2d695e20.zip
CMake-21089bf93f877b697874b0858d18915b2d695e20.tar.gz
CMake-21089bf93f877b697874b0858d18915b2d695e20.tar.bz2
BUG: INCLUDE_DIRECTORIES should interpret relative path arguments with respect to the current source directory.
-rw-r--r--Source/cmIncludeDirectoryCommand.cxx7
-rw-r--r--Tests/Complex/CMakeLists.txt2
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt2
-rw-r--r--Tests/ComplexRelativePaths/CMakeLists.txt2
4 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx
index 9dc2a25..b493eb3 100644
--- a/Source/cmIncludeDirectoryCommand.cxx
+++ b/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;
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 92fa7ef..81ade76 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/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
)
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 92fa7ef..81ade76 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/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
)
diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt
index 92fa7ef..81ade76 100644
--- a/Tests/ComplexRelativePaths/CMakeLists.txt
+++ b/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
)