From 21b18581bd7da49c80d6806b0f3e83ea0af2b076 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 13 Feb 2001 18:49:09 -0500 Subject: [PATCH] ENH: new vnl --- Source/cmConfigureFileNoAutoconf.cxx | 7 +++++++ Source/cmMakefile.cxx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/cmConfigureFileNoAutoconf.cxx b/Source/cmConfigureFileNoAutoconf.cxx index 86a5897f2..e4815a10e 100644 --- a/Source/cmConfigureFileNoAutoconf.cxx +++ b/Source/cmConfigureFileNoAutoconf.cxx @@ -42,6 +42,13 @@ void cmConfigureFileNoAutoconf::FinalPass() m_InputFile.c_str()); return; } + cmSystemTools::ConvertToUnixSlashes(m_OuputFile); + std::string::size_type pos = m_OuputFile.rfind('/'); + if(pos != std::string::npos) + { + std::string path = m_OuputFile.substr(0, pos); + cmSystemTools::MakeDirectory(path.c_str()); + } std::ofstream fout(m_OuputFile.c_str()); if(!fout) { diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index ec6c2d415..4872d9434 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -327,7 +327,7 @@ void cmMakefile::ParseDirectory(const char* dir) void cmMakefile::ExpandVaribles() { // make sure binary and source dir are defined - this->AddDefinition("CMAKE_BINARY_DIR", this->GetOutputDirectory()); + this->AddDefinition("CMAKE_BINARY_DIR", this->GetOutputHomeDirectory()); this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory()); // Now expand varibles in the include and link strings