summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c1c2698..9c4f7d9 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -217,7 +217,8 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
}
else if(arg.find("-P",0) == 0)
{
- std::string path = arg.substr(strlen("-P"));
+ i++;
+ std::string path = args[i];
if ( path.size() == 0 )
{
cmSystemTools::Error("No cmake scrpt provided.");