diff options
author | David Cole <david.cole@kitware.com> | 2011-02-02 23:18:14 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-02-02 23:18:14 (GMT) |
commit | 94d1684a8fd0de4310874cd582636a8e26402da2 (patch) | |
tree | 1c0d1dbdb4f8aedc046d6c6329002ce87f679ea7 /Source/cmake.cxx | |
parent | 4f1e1fe7821da7d5af17d18f031f72daa05c89e1 (diff) | |
download | CMake-94d1684a8fd0de4310874cd582636a8e26402da2.zip CMake-94d1684a8fd0de4310874cd582636a8e26402da2.tar.gz CMake-94d1684a8fd0de4310874cd582636a8e26402da2.tar.bz2 |
Add CMAKE_SCRIPT_MODE_FILE variable (#2828)
New CMake variable is set when processing a -P script file,
but not when configuring a project.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index bab0aaf..e063ea6 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -510,6 +510,12 @@ void cmake::ReadListFile(const char *path) (cmSystemTools::GetCurrentWorkingDirectory().c_str()); lg->GetMakefile()->SetStartDirectory (cmSystemTools::GetCurrentWorkingDirectory().c_str()); + if (this->GetScriptMode()) + { + std::string file(cmSystemTools::CollapseFullPath(path)); + cmSystemTools::ConvertToUnixSlashes(file); + lg->GetMakefile()->SetScriptModeFile(file.c_str()); + } if (!lg->GetMakefile()->ReadListFile(0, path)) { cmSystemTools::Error("Error processing file:", path); |