View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015257CMakeCMakepublic2014-11-19 14:032016-06-10 14:31
ReporterJavier 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
Platformx86OSWindowsOS Version7
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0015257: CMake from command line using wrong generator
DescriptionI'm trying to generate NMake Makefiles with cmake from the command line, but I'm getting the wrong generator:

c:\gitbuild\x>cmake –G "NMake Makefiles" c:\gitbuild\cc_vob\tcs
-- Building for: Visual Studio 8 2005
-- The C compiler identification is MSVC 14.0.50727
-- The CXX compiler identification is MSVC 14.0.50727
-- Check for working C compiler using: Visual Studio 8 2005
-- Check for working C compiler using: Visual Studio 8 2005 -- works
-- Detecting C compiler ABI info
Steps To Reproduce1) I open a Visual Studio 2005 command line (yes 2005, it's a legacy project).
2) I add cmake path:
   set PATH="c:\Program Files (x86)\CMake 2.8\bin";%path%
3) I run:
   cmake –G "NMake Makefiles" c:\gitbuild\cc_vob\tcs
4) Instead of generating nmake makefiles, I get a VS Solution:
-- Building for: Visual Studio 8 2005
-- The C compiler identification is MSVC 14.0.50727
-- The CXX compiler identification is MSVC 14.0.50727
Additional Information- If I don't add CMake bin to Path variable, it sometimes uses the correct generator, however, I have to call cmake with a fully qualified name:

c:\gitbuild\p>"c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -G "NMake Makefiles" ..\cc_vob\tcs
-- The C compiler identification is MSVC 14.0.50727
-- The CXX compiler identification is MSVC 14.0.50727
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 8/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done

- I'm using Visual Studio Command Line Prompt shell (x86).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0037235)
Brad King (manager)
2014-11-19 16:26

Be sure to use a fresh build tree.
(0037236)
Javier (reporter)
2014-11-20 06:45

Yes, I'm using a fresh build tree every time, and the issue reproduces.
(0037238)
Brad King (manager)
2014-11-20 08:44

I can't reproduce this. It is very basic functionality that is covered every day by our test infrastructure. There must be something particular about your setup.

Please post a CMakeLists.txt file for a project that reproduces the problem.

Also make sure there is no CMakeCache.txt or CMakeFiles/ directory in your source tree.
(0042672)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-11-19 14:03 Javier New Issue
2014-11-19 16:26 Brad King Note Added: 0037235
2014-11-20 06:45 Javier Note Added: 0037236
2014-11-20 08:44 Brad King Note Added: 0037238
2016-06-10 14:29 Kitware Robot Note Added: 0042672
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team