Hi,

Attached is a patch that changes the warning of nmake/jom generators when
VCVarsAll.bat hasn't been run:

   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.

Sample output; this was run from a clean cmd.exe - i.e. without having run
VCVarsAll.bat:

C:\Users\JamesJ\AppData\Local\Temp\cmake-warn-build>..\cmake-build\bin\cmake
"-GNMake Makefiles JOM" ../cmake-warn
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_C_COMPILER:

    cl

  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.


CMake Error at CMakeLists.txt:3 (project):
  The CMAKE_CXX_COMPILER:

    cl

  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.


-- Configuring incomplete, errors occurred!
See also
"C:/Users/JamesJ/AppData/Local/Temp/cmake-warn-build/CMakeFiles/CMakeOutput.
log".
See also
"C:/Users/JamesJ/AppData/Local/Temp/cmake-warn-build/CMakeFiles/CMakeError.l
og".

Best regards,

James Johnston

Attachment: 0001-nmake-jom-Only-warn-about-bad-VS-environment-if-comp.patch
Description: Binary data

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to