The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=11695 ====================================================================== Reported By: Vladislav Vaintroub Assigned To: ====================================================================== Project: CMake Issue ID: 11695 Category: CMake Reproducibility: always Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2011-01-13 19:51 EST Last Modified: 2011-01-13 19:51 EST ====================================================================== Summary: rc.exe error in 2.8.4-rc1 if ADD_DEFINITITIONS contains definition with space Description:
If 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 Reproduce: unpack attached repro.zip, try to build with VS2010 generator Additional Information: Very 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\"" ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-01-13 19:51 Vladislav VaintroubNew Issue 2011-01-13 19:51 Vladislav VaintroubFile Added: repro.zip ====================================================================== _______________________________________________ cmake-developers mailing list [email protected] http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
