View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011695CMakeCMakepublic2011-01-13 19:512011-05-02 14:46
ReporterVladislav Vaintroub 
Assigned ToDavid Cole 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.4Fixed in VersionCMake 2.8.4 
Summary0011695: rc.exe error in 2.8.4-rc1 if ADD_DEFINITITIONS contains definition with space
DescriptionIf add definition contains string with space character, build using VS2010
(or maybe also other VS) would fail with rc.exe error

Example project:

cmake_minimum_required(VERSION 2.6)
ADD_DEFINITIONS(-DMYSQL_DATADIR="data 1")
ADD_EXECUTABLE(main main.cc versioninfo_exe.rc)

Output of
cmake --build . --config debug

...
ResourceCompile:
  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /D WIN32 /D _WI
NDOWS /D _DEBUG /D "MYSQL_DATADIR=\"data 1\"" /D "CMAKE_INTDIR=\"Debug\"" /l"0x0
409" /nologo /fo"main.dir\Debug\versioninfo_exe.res" ..\versioninfo_exe.rc
  Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385

  Copyright (C) Microsoft Corporation. All rights reserved.


RC : fatal error RC1107: invalid usage; use RC /? for Help [H:\bzr\repro\yyy\mai
n.vcxproj]
Steps To Reproduceunpack attached repro.zip, try to build with VS2010 generator
Additional InformationVery interesting, if I omit
cmake_minimum_required(VERSION 2.6)

altogether, the error does not happen.
The command line for rc.exe in case cmake_minimum_required is NOT set contains
/D "MYSQL_DATADIR=data 1"

If cmake_minimum_required is set, command line changes to
/D "MYSQL_DATADIR=\"data 1\""
TagsNo tags attached.
Attached Fileszip file icon repro.zip [^] (860 bytes) 2011-01-13 19:51

 Relationships

  Notes
(0024673)
Brad King (manager)
2011-01-14 08:34

The reason cmake_minimum_required(VERSION 2.6) affects it is due to CMake Policy CMP0005:
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0005 [^]
(0024674)
Brad King (manager)
2011-01-14 08:38

Previous versions of CMake did not pass *any* preprocessor definitions to the resource compiler in VS 2010. It was added here:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=16e7d4ba [^]
(0025076)
David Cole (manager)
2011-01-25 19:08

Fixed in this commit, just pushed to CMake 'next':
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=662756036e4f4983b00ab7740773a55bef808c64 [^]

Hopefully, we can squeeze this into the 2.8.4-rc2 build coming up...
(0025078)
David Cole (manager)
2011-01-26 08:41
edited on: 2011-01-26 08:42

See also follow commits to correct dashboard issues that arose on the nightly builds last night:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78fe97f2ff4dbe66590ee79a342ac01a5566ef31 [^]
(KWStyle line too long problem)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f9919d93cad64de58775e4a7609b0ffb37d061e [^]
(test failed because of space in the /D value on VS6 and Cygwin)

Need more investigation here to determine if VS6 and Cygwin actually support spaces here and CMake is generating something incorrectly, or whether they are simply not supported via these rc/windres compiler implementations...

(0026375)
David Cole (manager)
2011-05-02 14:46

Closing resolved issues that have not been updated in more than 3 months.

 Issue History
Date Modified Username Field Change
2011-01-13 19:51 Vladislav Vaintroub New Issue
2011-01-13 19:51 Vladislav Vaintroub File Added: repro.zip
2011-01-14 08:34 Brad King Note Added: 0024673
2011-01-14 08:38 Brad King Note Added: 0024674
2011-01-17 17:01 David Cole Assigned To => David Cole
2011-01-17 17:01 David Cole Status new => assigned
2011-01-17 17:01 David Cole Target Version => CMake 2.8.4
2011-01-17 17:01 David Cole Description Updated
2011-01-20 07:05 David Cole Assigned To David Cole => Bill Hoffman
2011-01-25 19:08 David Cole Assigned To Bill Hoffman => David Cole
2011-01-25 19:08 David Cole Note Added: 0025076
2011-01-25 19:08 David Cole Status assigned => resolved
2011-01-25 19:08 David Cole Fixed in Version => CMake 2.8.4
2011-01-25 19:08 David Cole Resolution open => fixed
2011-01-26 08:41 David Cole Note Added: 0025078
2011-01-26 08:42 David Cole Note Edited: 0025078
2011-05-02 14:46 David Cole Note Added: 0026375
2011-05-02 14:46 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team