View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013830CMakeCMakepublic2013-01-03 17:302016-06-10 14:31
ReporterAmine Khaldi 
Assigned ToKitware Robot 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 2.8.10.2 
Target VersionFixed in Version 
Summary0013830: Add support for RC-specific preprocessor definitions
DescriptionReactOS uses set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> ${I18N_DEFS} /fo<OBJECT> <SOURCE>")

Which works perfectly with ninja and nmake makefiles. When you use the VS 2010 generator you will get a *very* different handling of rc files, that leads to broken binaries. There is absolutely no way to customize it at least and put it inside an if(MSVC_IDE) or something (as a hack).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0031973)
Brad King (manager)
2013-01-04 08:22

Rule variables are used only for the Makefile and Ninja generators. The VS 10 IDE generators just add sources to the .vcxproj files and let MSBuild handle compilation.

What goes in ${I18N_DEFS} that you want to end up on the command line?
(0031975)
Amine Khaldi (reporter)
2013-01-04 08:26

Localization defines. We found no way to add them to the RC compiler only.

Also, the VS generator adds a flag for the "Culture" (it adds /l 0x0409 flag which represents English (United States) (0x409) ) that we didn't ask for and we find no way to remove it.
(0031977)
Brad King (manager)
2013-01-04 08:44

CMake doesn't have per-language preprocessor definition configuration, but you can set it on a specific source file:

 set_property(SOURCE my.rc PROPERTIES COMPILE_DEFINITIONS -DI18N)

The Culture flag is not coming from CMake. That is default behavior of the project files. CMake will map flags to project file elements for the cl, lib, and link tools but no such feature is yet implemented for resource compilation.
(0031978)
Amine Khaldi (reporter)
2013-01-04 08:46

We have more than 800 targets. I sincerely hope that setting the COMPILE_DEFINITIONS property with our list of defines (tons of defines) for localization, is not the only solution, because that's just impractical.
(0031993)
Brad King (manager)
2013-01-07 10:56

Is your main goal to add preprocessor definitions exclusively for resources and not for C/C++ code?
(0031994)
Amine Khaldi (reporter)
2013-01-07 10:58
edited on: 2013-01-07 10:58

Yes, since these are localization definitions that affect only rc files.

(0042190)
Kitware Robot (administrator)
2016-06-10 14:28

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
2013-01-03 17:30 Amine Khaldi New Issue
2013-01-04 08:22 Brad King Note Added: 0031973
2013-01-04 08:26 Amine Khaldi Note Added: 0031975
2013-01-04 08:44 Brad King Note Added: 0031977
2013-01-04 08:46 Amine Khaldi Note Added: 0031978
2013-01-07 10:56 Brad King Note Added: 0031993
2013-01-07 10:58 Amine Khaldi Note Added: 0031994
2013-01-07 10:58 Amine Khaldi Note Edited: 0031994
2013-01-07 11:49 Brad King Severity major => feature
2013-01-07 11:49 Brad King Status new => backlog
2013-01-07 11:49 Brad King Summary VS 2010 generator completely ignores the RC compiling rule => Add support for RC-specific preprocessor definitions
2016-06-10 14:28 Kitware Robot Note Added: 0042190
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team