[cmake-developers] [PATCH v2] Now prints warning when --build is not honored

Ashley Whetter ashley at awhetter.co.uk
Sun Feb 21 10:16:00 EST 2016


---
In this version of the patch I've changed the message printed to give more
information on how '--build' should be used.

 Source/cmake.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8f6b952..95948d5 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -798,6 +798,12 @@ void cmake::SetArgs(const std::vector<std::string>& args,
         this->SetGlobalGenerator(gen);
         }
       }
+    else if (arg.find("--build", 0) == 0)
+      {
+      cmSystemTools::Message("Ignoring option '--build' "
+          "because it is meant to be used only "
+          "to drive an already-generated project build system." , "Warning");
+      }
     // no option assume it is the path to the source
     else
       {
-- 
2.7.1



More information about the cmake-developers mailing list