This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  925cb2ee6c3614195fc1786a3c909ec3092f3b89 (commit)
       via  afeb4eb243e01df5c7396dc346f2629b21115e2c (commit)
      from  f8d61cbe5066a6d8ce3e09afc40cdf1ea0e73631 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=925cb2ee6c3614195fc1786a3c909ec3092f3b89
commit 925cb2ee6c3614195fc1786a3c909ec3092f3b89
Merge: f8d61cb afeb4eb
Author:     James Johnston <johnstonj.pub...@codenest.com>
AuthorDate: Thu Aug 6 13:44:31 2015 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Thu Aug 6 13:44:31 2015 -0400

    Merge topic 'change-nmake-env-warning' into next
    
    afeb4eb2 nmake/jom: Only warn about bad VS environment if compiler not 
found.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=afeb4eb243e01df5c7396dc346f2629b21115e2c
commit afeb4eb243e01df5c7396dc346f2629b21115e2c
Author:     James Johnston <johnstonj.pub...@codenest.com>
AuthorDate: Wed Aug 5 21:23:07 2015 +0000
Commit:     James Johnston <johnstonj.pub...@codenest.com>
CommitDate: Thu Aug 6 17:32:43 2015 +0000

    nmake/jom: Only warn about bad VS environment if compiler not found.
    
    nmake and jom generators no longer warn about missing INCLUDE/LIB
    environment variables unless the C/CXX compiler cannot be found.  This
    is useful if the user does not want to use these generators with the
    Visual C++ compiler, or they do not want to enable any language.

diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 3402fbc..ec916ae 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -374,6 +374,8 @@ protected:
   void SetLanguageEnabledFlag(const std::string& l, cmMakefile* mf);
   void SetLanguageEnabledMaps(const std::string& l, cmMakefile* mf);
   void FillExtensionToLanguageMap(const std::string& l, cmMakefile* mf);
+  virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
+                                   const char* envVar) const;
 
   virtual bool ComputeTargetDepends();
 
@@ -462,8 +464,6 @@ private:
 
   virtual void ForceLinkerLanguages();
 
-  virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
-                                   const char* envVar) const;
   void CheckCompilerIdCompatibility(cmMakefile* mf,
                                     std::string const& lang) const;
 
diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx 
b/Source/cmGlobalJOMMakefileGenerator.cxx
index 50e7053..3f33f91 100644
--- a/Source/cmGlobalJOMMakefileGenerator.cxx
+++ b/Source/cmGlobalJOMMakefileGenerator.cxx
@@ -36,18 +36,6 @@ void cmGlobalJOMMakefileGenerator
   // pick a default
   mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
   mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
-  if(!(cmSystemTools::GetEnv("INCLUDE") &&
-       cmSystemTools::GetEnv("LIB"))
-    )
-    {
-    std::string message = "To use the JOM generator, cmake must be run "
-      "from a shell that can use the compiler cl from the command line. "
-      "This environment does not contain INCLUDE, LIB, or LIBPATH, and "
-      "these must be set for the cl compiler to work. ";
-    mf->IssueMessage(cmake::WARNING,
-                     message);
-    }
-
   this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
 }
 
@@ -58,3 +46,19 @@ void cmGlobalJOMMakefileGenerator
   entry.Name = cmGlobalJOMMakefileGenerator::GetActualName();
   entry.Brief = "Generates JOM makefiles.";
 }
+
+//----------------------------------------------------------------------------
+void cmGlobalJOMMakefileGenerator::PrintCompilerAdvice(std::ostream& os,
+                                                  std::string const& lang,
+                                                  const char* envVar) const
+{
+  if(lang == "CXX" || lang == "C")
+    {
+    os <<
+      "To use the JOM generator with Visual C++, cmake must be run from a "
+      "shell that can use the compiler cl from the command line. This "
+      "environment is unable to invoke the cl compiler. To fix this problem, "
+      "run cmake from the Visual Studio Command Prompt (vcvarsall.bat).\n";
+    }
+  this->cmGlobalUnixMakefileGenerator3::PrintCompilerAdvice(os, lang, envVar);
+}
diff --git a/Source/cmGlobalJOMMakefileGenerator.h 
b/Source/cmGlobalJOMMakefileGenerator.h
index 2185b23..1869fed 100644
--- a/Source/cmGlobalJOMMakefileGenerator.h
+++ b/Source/cmGlobalJOMMakefileGenerator.h
@@ -42,6 +42,9 @@ public:
    */
   virtual void EnableLanguage(std::vector<std::string>const& languages,
                               cmMakefile *, bool optional);
+private:
+  void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
+                           const char* envVar) const;
 };
 
 #endif
diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx 
b/Source/cmGlobalNMakeMakefileGenerator.cxx
index 4219c34..7c570a6 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.cxx
+++ b/Source/cmGlobalNMakeMakefileGenerator.cxx
@@ -36,18 +36,6 @@ void cmGlobalNMakeMakefileGenerator
   // pick a default
   mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
   mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
-  if(!(cmSystemTools::GetEnv("INCLUDE") &&
-       cmSystemTools::GetEnv("LIB"))
-    )
-    {
-    std::string message = "To use the NMake generator, cmake must be run "
-      "from a shell that can use the compiler cl from the command line. "
-      "This environment does not contain INCLUDE, LIB, or LIBPATH, and "
-      "these must be set for the cl compiler to work. ";
-    mf->IssueMessage(cmake::WARNING,
-                     message);
-    }
-
   this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
 }
 
@@ -58,3 +46,19 @@ void cmGlobalNMakeMakefileGenerator
   entry.Name = cmGlobalNMakeMakefileGenerator::GetActualName();
   entry.Brief = "Generates NMake makefiles.";
 }
+
+//----------------------------------------------------------------------------
+void cmGlobalNMakeMakefileGenerator::PrintCompilerAdvice(std::ostream& os,
+                                                  std::string const& lang,
+                                                  const char* envVar) const
+{
+  if(lang == "CXX" || lang == "C")
+    {
+    os <<
+      "To use the NMake generator with Visual C++, cmake must be run from a "
+      "shell that can use the compiler cl from the command line. This "
+      "environment is unable to invoke the cl compiler. To fix this problem, "
+      "run cmake from the Visual Studio Command Prompt (vcvarsall.bat).\n";
+    }
+  this->cmGlobalUnixMakefileGenerator3::PrintCompilerAdvice(os, lang, envVar);
+}
diff --git a/Source/cmGlobalNMakeMakefileGenerator.h 
b/Source/cmGlobalNMakeMakefileGenerator.h
index dd72c49..3c8375a 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.h
+++ b/Source/cmGlobalNMakeMakefileGenerator.h
@@ -40,6 +40,9 @@ public:
    */
   virtual void EnableLanguage(std::vector<std::string>const& languages,
                               cmMakefile *, bool optional);
+private:
+  void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
+                           const char* envVar) const;
 };
 
 #endif
diff --git a/Tests/RunCMake/CompilerNotFound/BadCompilerC-stderr-JOM.txt 
b/Tests/RunCMake/CompilerNotFound/BadCompilerC-stderr-JOM.txt
new file mode 100644
index 0000000..b7db7eb
--- /dev/null
+++ b/Tests/RunCMake/CompilerNotFound/BadCompilerC-stderr-JOM.txt
@@ -0,0 +1,17 @@
+CMake Error at BadCompilerC.cmake:2 \(enable_language\):
+  The CMAKE_C_COMPILER:
+
+    no-C-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the JOM generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
+  the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/CompilerNotFound/BadCompilerC-stderr-NMake.txt 
b/Tests/RunCMake/CompilerNotFound/BadCompilerC-stderr-NMake.txt
new file mode 100644
index 0000000..03c5933
--- /dev/null
+++ b/Tests/RunCMake/CompilerNotFound/BadCompilerC-stderr-NMake.txt
@@ -0,0 +1,17 @@
+CMake Error at BadCompilerC.cmake:2 \(enable_language\):
+  The CMAKE_C_COMPILER:
+
+    no-C-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the NMake generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
+  the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/CompilerNotFound/BadCompilerCXX-stderr-JOM.txt 
b/Tests/RunCMake/CompilerNotFound/BadCompilerCXX-stderr-JOM.txt
new file mode 100644
index 0000000..4b42ea6
--- /dev/null
+++ b/Tests/RunCMake/CompilerNotFound/BadCompilerCXX-stderr-JOM.txt
@@ -0,0 +1,17 @@
+CMake Error at BadCompilerCXX.cmake:2 \(enable_language\):
+  The CMAKE_CXX_COMPILER:
+
+    no-CXX-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the JOM generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
+  to the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/CompilerNotFound/BadCompilerCXX-stderr-NMake.txt 
b/Tests/RunCMake/CompilerNotFound/BadCompilerCXX-stderr-NMake.txt
new file mode 100644
index 0000000..1bfcdcc
--- /dev/null
+++ b/Tests/RunCMake/CompilerNotFound/BadCompilerCXX-stderr-NMake.txt
@@ -0,0 +1,17 @@
+CMake Error at BadCompilerCXX.cmake:2 \(enable_language\):
+  The CMAKE_CXX_COMPILER:
+
+    no-CXX-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the NMake generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
+  to the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/CompilerNotFound/BadCompilerCandCXX-stderr-JOM.txt 
b/Tests/RunCMake/CompilerNotFound/BadCompilerCandCXX-stderr-JOM.txt
new file mode 100644
index 0000000..f25a267
--- /dev/null
+++ b/Tests/RunCMake/CompilerNotFound/BadCompilerCandCXX-stderr-JOM.txt
@@ -0,0 +1,35 @@
+CMake Error at BadCompilerCandCXX.cmake:3 \(project\):
+  The CMAKE_C_COMPILER:
+
+    no-C-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the JOM generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
+  the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+CMake Error at BadCompilerCandCXX.cmake:3 \(project\):
+  The CMAKE_CXX_COMPILER:
+
+    no-CXX-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the JOM generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
+  to the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git 
a/Tests/RunCMake/CompilerNotFound/BadCompilerCandCXX-stderr-NMake.txt 
b/Tests/RunCMake/CompilerNotFound/BadCompilerCandCXX-stderr-NMake.txt
new file mode 100644
index 0000000..ffcdce8
--- /dev/null
+++ b/Tests/RunCMake/CompilerNotFound/BadCompilerCandCXX-stderr-NMake.txt
@@ -0,0 +1,35 @@
+CMake Error at BadCompilerCandCXX.cmake:3 \(project\):
+  The CMAKE_C_COMPILER:
+
+    no-C-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the NMake generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
+  the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
++
+CMake Error at BadCompilerCandCXX.cmake:3 \(project\):
+  The CMAKE_CXX_COMPILER:
+
+    no-CXX-compiler
+
+  is not a full path and was not found in the PATH.
+
+  To use the NMake generator with Visual C\+\+, cmake must be run from a shell
+  that can use the compiler cl from the command line.  This environment is
+  unable to invoke the cl compiler.  To fix this problem, run cmake from the
+  Visual Studio Command Prompt \(vcvarsall.bat\).
+
+  Tell CMake where to find the compiler by setting either the environment
+  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
+  to the compiler, or to the compiler name if it is in the PATH.
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)$
diff --git a/Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake 
b/Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake
index 8b84f39..19d149c 100644
--- a/Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake
@@ -4,6 +4,20 @@ if("${RunCMake_GENERATOR}" MATCHES "Visual Studio|Xcode")
   run_cmake(NoCompilerC-IDE)
   run_cmake(NoCompilerCXX-IDE)
   run_cmake(NoCompilerCandCXX-IDE)
+elseif(RunCMake_GENERATOR STREQUAL "NMake Makefiles")
+  set(RunCMake-stderr-file BadCompilerC-stderr-NMake.txt)
+  run_cmake(BadCompilerC)
+  set(RunCMake-stderr-file BadCompilerCXX-stderr-NMake.txt)
+  run_cmake(BadCompilerCXX)
+  set(RunCMake-stderr-file BadCompilerCandCXX-stderr-NMake.txt)
+  run_cmake(BadCompilerCandCXX)
+elseif(RunCMake_GENERATOR STREQUAL "NMake Makefiles JOM")
+  set(RunCMake-stderr-file BadCompilerC-stderr-JOM.txt)
+  run_cmake(BadCompilerC)
+  set(RunCMake-stderr-file BadCompilerCXX-stderr-JOM.txt)
+  run_cmake(BadCompilerCXX)
+  set(RunCMake-stderr-file BadCompilerCandCXX-stderr-JOM.txt)
+  run_cmake(BadCompilerCandCXX)
 else()
   run_cmake(BadCompilerC)
   run_cmake(BadCompilerCXX)

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGlobalGenerator.h                         |    4 +--
 Source/cmGlobalJOMMakefileGenerator.cxx            |   28 +++++++++++---------
 Source/cmGlobalJOMMakefileGenerator.h              |    3 +++
 Source/cmGlobalNMakeMakefileGenerator.cxx          |   28 +++++++++++---------
 Source/cmGlobalNMakeMakefileGenerator.h            |    3 +++
 ...lerC-stderr.txt => BadCompilerC-stderr-JOM.txt} |    5 ++++
 ...rC-stderr.txt => BadCompilerC-stderr-NMake.txt} |    5 ++++
 ...XX-stderr.txt => BadCompilerCXX-stderr-JOM.txt} |    5 ++++
 ...-stderr.txt => BadCompilerCXX-stderr-NMake.txt} |    5 ++++
 ...tderr.txt => BadCompilerCandCXX-stderr-JOM.txt} |   10 +++++++
 ...err.txt => BadCompilerCandCXX-stderr-NMake.txt} |   10 +++++++
 Tests/RunCMake/CompilerNotFound/RunCMakeTest.cmake |   14 ++++++++++
 12 files changed, 94 insertions(+), 26 deletions(-)
 copy Tests/RunCMake/CompilerNotFound/{BadCompilerC-stderr.txt => 
BadCompilerC-stderr-JOM.txt} (61%)
 copy Tests/RunCMake/CompilerNotFound/{BadCompilerC-stderr.txt => 
BadCompilerC-stderr-NMake.txt} (60%)
 copy Tests/RunCMake/CompilerNotFound/{BadCompilerCXX-stderr.txt => 
BadCompilerCXX-stderr-JOM.txt} (61%)
 copy Tests/RunCMake/CompilerNotFound/{BadCompilerCXX-stderr.txt => 
BadCompilerCXX-stderr-NMake.txt} (61%)
 copy Tests/RunCMake/CompilerNotFound/{BadCompilerCandCXX-stderr.txt => 
BadCompilerCandCXX-stderr-JOM.txt} (61%)
 copy Tests/RunCMake/CompilerNotFound/{BadCompilerCandCXX-stderr.txt => 
BadCompilerCandCXX-stderr-NMake.txt} (60%)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to