MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0014933 | CMake | (No Category) | public | 2014-05-24 15:29 | 2014-11-03 08:38 |
| Reporter | Mathäus Mendel | ||||
| Assigned To | |||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Platform | Visual Studio (NMake) | OS | Windows | OS Version | Any |
| Product Version | CMake 2.8.12.2 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0014933: CMake set wrong flags to RC compiler | ||||
| Description | The Microsoft Resource Compiler fails to compile any resource file that have an #include directive. Generating the following error: fatal error RC1015: cannot open include file '<filename>.h'. Where <filename> is any file you may include. | ||||
| Steps To Reproduce | On the CMakeLists.txt, add the following instruction: add_definitions(-WX) # treat warnings as errors. And create a target with a .rc file on it's source list. | ||||
| Additional Information | CMake is passing the CXX/C compiler flags to the Resource Compiler, which it should not. On Modules/Platform/Windows-MSVC.cmake:59 # make sure to enable languages after setting configuration types enable_language(RC) set(CMAKE_COMPILE_RESOURCE "rc <FLAGS> /fo<OBJECT> <SOURCE>") The MSVC compiler flag -WX will tell the Resource compiler to "ignore the INCLUDE env variable and warn on invalid code page", thus, breaking the build. My recommendation is to remove the <FLAGS> from the directive, since all the compiler flags are meaningless to the Resource compiler, and/or create a new one that will directly reflect the user intention to change the RC compiler behavior, like <RC_FLAGS>. | ||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | https://public.kitware.com/Bug/file/5151/cmake-rc-bug.zip | ||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2014-05-24 15:29 | Mathäus Mendel | New Issue | |||
| 2014-05-24 15:29 | Mathäus Mendel | File Added: cmake-rc-bug.zip | |||
| 2014-05-24 15:46 | Mathäus Mendel | Note Added: 0035927 | |||
| 2014-05-27 10:06 | Brad King | Note Added: 0035942 | |||
| 2014-05-27 18:47 | Mathäus Mendel | Note Added: 0035950 | |||
| 2014-05-28 08:32 | Brad King | Status | new => resolved | ||
| 2014-05-28 08:32 | Brad King | Resolution | open => no change required | ||
| 2014-11-03 08:38 | Robert Maynard | Note Added: 0037144 | |||
| 2014-11-03 08:38 | Robert Maynard | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||