瀏覽代碼

CTest: Use -A option to pass generator platform selection

This is less verbose than defining CMAKE_GENERATOR_PLATFORM.
Brad King 11 年之前
父節點
當前提交
29bd843e8b
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Source/CTest/cmCTestBuildAndTestHandler.cxx
  2. 1 1
      Source/CTest/cmCTestConfigureCommand.cxx

+ 1 - 1
Source/CTest/cmCTestBuildAndTestHandler.cxx

@@ -70,7 +70,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
     }
     }
   if(!this->BuildGeneratorPlatform.empty())
   if(!this->BuildGeneratorPlatform.empty())
     {
     {
-    std::string platform = "-DCMAKE_GENERATOR_PLATFORM=";
+    std::string platform = "-A";
     platform += this->BuildGeneratorPlatform;
     platform += this->BuildGeneratorPlatform;
     args.push_back(platform);
     args.push_back(platform);
     }
     }

+ 1 - 1
Source/CTest/cmCTestConfigureCommand.cxx

@@ -122,7 +122,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
         this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_PLATFORM");
         this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_PLATFORM");
       if(cmakeGeneratorPlatform && *cmakeGeneratorPlatform)
       if(cmakeGeneratorPlatform && *cmakeGeneratorPlatform)
         {
         {
-        cmakeConfigureCommand += " \"-DCMAKE_GENERATOR_PLATFORM=";
+        cmakeConfigureCommand += " \"-A";
         cmakeConfigureCommand += cmakeGeneratorPlatform;
         cmakeConfigureCommand += cmakeGeneratorPlatform;
         cmakeConfigureCommand += "\"";
         cmakeConfigureCommand += "\"";
         }
         }