[CMake] using cmake on windows - query on existing targets

Chauhan, Vikas vikas.chauhan at anritsu.com
Wed Jan 13 17:09:09 EST 2010



> -----Original Message-----
> From: Bill Hoffman [mailto:bill.hoffman at kitware.com]
> Sent: 12 January 2010 22:05
> To: Chauhan, Vikas
> Cc: Eric Noulard; cmake at cmake.org
> Subject: Re: [CMake] using cmake on windows - query on existing
targets
> 
> 
> >
> > I noticed that it generates the following output:
> > -- Check if this is a free VC compiler - yes
> > I do not think I am using a free VC compiler, something is wrong
here.
> > Is it possible to use nmake with Visual Studio 2008 compiler using
cmake
> > 2.8?
> >
> 
> Are you running cmake from a shell that has the environment setup
> correctly for cl to work?
> 
> 
> foo.cxx
> #include <iostream>
> int main() { std::cout << "hello\n";}
> 
> cl foo.cxx
> 
> Does that work for you?
> 
> What version of the compiler did you install?  The commercial versions
> of the compiler have a VS command prompt under the tools menu that you
> can use to create a shell with the correct env to run the compiler.
> 
> -Bill

Hi,

I am still getting the problem from Visual Studio's command prompt. 
Following the compiler detail:
------------------------------------------------------------------------
-------------------------------
C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08
for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]
------------------------------------------------------------------------
-------------------------------
Following are the details of the error:
------------------------------------------------------------------------
-------------------------------
C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cmake ../ -G
"NMake Mak
efiles"
CMake Error: CMake was unable to find a build program corresponding to
"NMake Ma
kefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a
differe
nt build tool.
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/Mappe
rGenerator/build_nmake/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/Mappe
rGenerator/build_nmake/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!


C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cl foo.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08
for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

foo.cpp
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C
4530: C++ exception handler used, but unwind semantics are not enabled.
Specify
/EHsc
Microsoft (R) Incremental Linker Version 9.00.21022.08
------------------------------------------------------------------------
------------------------------


More information about the CMake mailing list