View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014861CMakeCMakepublic2014-04-03 12:122016-06-10 14:31
Reporterirwin 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformBoth Linux and WindowsOSOS Version
Product VersionCMake 2.8.12.2 
Target VersionFixed in Version 
Summary0014861: cmake consumes command-line arguments it does not understand without a WARNING message
DescriptionThe commands

cmake -whatever ..

or

cmake whatever ..

currently work fine with no warning messages at all about the "-whatever" and "whatever" arguments that it ignores. I believe I ran into this issue years ago so it is probably a long-standing bug that has long been tolerated, but from recent rather bizarre experience as a result of this bug that I just learned about, I think this bug should be addressed.

What happened is one of our knowlegeable PLplot users could not get the cmake command-line to work properly on a Windows platform. After a lot of head-scratching and nobody getting anywhere with this, it turned out he was taking notes using Microsoft Word, and cut and pasted from that to the command-line. Unfortunately, Microsoft word had quietly inserted a non-ascii hyphen in that command-line so all the -D options did not have the correct hyphen and were quietly ignored because of this CMake bug! Instead, cmake should have given loud warnings that it could not understand parts of his command line.
Steps To ReproduceCreate a CMakeLists.txt file consisting of the following two lines:

cmake_minimum_required(VERSION 2.8.12.2 FATAL_ERROR)
project(test_cmake NONE)

Then create an empty build subdirectory, cd to it, and try either
one of the above cmake commands (or try specifying some -D options
with non-ascii hyphens). The (bad) result is there are no warning messages about the parts of the command line that cmake could not understand.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0035632)
Brad King (manager)
2014-04-03 12:50

This is known, and major internal refactoring of how the command line is processed will be needed to fix it. The problem is that we basically just pass all the arguments to everything that might need them and each place just uses what it knows and ignores the rest.
(0042527)
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-04-03 12:12 irwin New Issue
2014-04-03 12:50 Brad King Note Added: 0035632
2014-04-03 12:50 Brad King Status new => backlog
2016-06-10 14:29 Kitware Robot Note Added: 0042527
2016-06-10 14:29 Kitware Robot Status backlog => 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