[CMake] Why do jom/nmake generators require cl to build with mingw?
John R. Cary
cary at txcorp.com
Thu Sep 15 08:08:31 EDT 2011
I was trying to configure a project to use jom or name with the
mingw compilers.
I was configuring with
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=C:/winsame/volatile-mingw/txphysics-r1504-ser \
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
-DCMAKE_INSTALL_ALWAYS:BOOL=TRUE \
-DCMAKE_COLOR_MAKEFILE:BOOL=FALSE \
-G 'NMake Makefiles' \
-DCMAKE_C_COMPILER:FILEPATH='mingw32-gcc' \
-DCMAKE_CXX_COMPILER:FILEPATH='mingw32-g++' \
-DCMAKE_Fortran_COMPILER:FILEPATH='mingw32-gfortran' \
C:/cygwin/home/user/vorpalall-mg/txphysics
but got the warning,
CMake Warning at CMakeLists.txt:10 (project):
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.
and ultimately the error,
CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22
(GET_FILENAME_COMPONENT):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/Platform/Windows-GNU.cmake:60 (enable_language)
C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/Platform/Windows-GNU-C.cmake:1 (include)
C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:56 (INCLUDE)
CMakeLists.txt:2 (PROJECT)
So I did put cl in my path, and now it configures, but this seems strange.
Is it necessary to still have cl when using mingw?
Thx....John Cary
More information about the CMake
mailing list