summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-10-04 12:59:02 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-10-04 12:59:02 (GMT)
commit38d1ea9b4c6d79fff36cc19e3fb81a5253b6665f (patch)
tree63e8c07112ff9b5a6ded680bf3fc1076249c9fdd /Source
parentd27cd931ae8f4cd4c53ef78c1c61e3cfe5946e77 (diff)
downloadCMake-38d1ea9b4c6d79fff36cc19e3fb81a5253b6665f.zip
CMake-38d1ea9b4c6d79fff36cc19e3fb81a5253b6665f.tar.gz
CMake-38d1ea9b4c6d79fff36cc19e3fb81a5253b6665f.tar.bz2
always set PROJECT_SOURCE_DIR etc
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 99fe4b7..5e94255 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -32,6 +32,13 @@ cmLocalGenerator::~cmLocalGenerator()
void cmLocalGenerator::Configure()
{
+ // set the PROJECT_SOURCE_DIR and PROJECT_BIN_DIR to default values
+ // just in case the project does not include a PROJECT command
+ m_Makefile->AddDefinition("PROJECT_BINARY_DIR",
+ m_Makefile->GetHomeOutputDirectory());
+ m_Makefile->AddDefinition("PROJECT_SOURCE_DIR",
+ m_Makefile->GetHomeDirectory());
+
// find & read the list file
std::string currentStart = m_Makefile->GetStartDirectory();
currentStart += "/CMakeLists.txt";