VS: Fix support for rc /nologo flag in per-source COMPILE_FLAGS

Since commit v3.9.0-rc1~160^2 (VS: Use tool-specific flag table for
COMPILE_FLAGS parsing, 2017-05-03) we now correctly use the `rc` flag
table to process the COMPILE_FLAGS flags of `.rc` source files instead
of incorrectly using the `cl` flag table as before.  However, our `rc`
flag table is not complete.  The `/nologo` flag was working before only
by accident because the `cl` flag table entry for it happened to match.
Add the proper entry to the `rc` flag table.

Fixes: #16991
This commit is contained in:
Brad King 2017-06-22 09:30:43 -04:00
parent ea6bb8293f
commit 974f43338b
5 changed files with 8 additions and 0 deletions

View File

@ -1,6 +1,7 @@
static cmVS7FlagTable cmVS10RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};

View File

@ -1,6 +1,7 @@
static cmVS7FlagTable cmVS11RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};

View File

@ -1,6 +1,7 @@
static cmVS7FlagTable cmVS12RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};

View File

@ -1,6 +1,7 @@
static cmVS7FlagTable cmVS14RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};

View File

@ -51,5 +51,9 @@ add_library(ResourceLib STATIC lib.cpp lib.rc)
add_executable(VSResource main.cpp test.rc)
target_link_libraries(VSResource ResourceLib)
if(MSVC AND NOT MSVC_VERSION VERSION_LESS 1600)
set_property(SOURCE test.rc PROPERTY COMPILE_FLAGS /nologo)
endif()
set_property(TARGET VSResource
PROPERTY VS_GLOBAL_CMakeTestVsGlobalVariable "test val")