Commit 974f4333 authored by Brad King's avatar Brad King

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
parent ea6bb829
static cmVS7FlagTable cmVS10RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};
static cmVS7FlagTable cmVS11RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};
static cmVS7FlagTable cmVS12RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};
static cmVS7FlagTable cmVS14RCFlagTable[] = {
// Bool Properties
{ "NullTerminateStrings", "n", "", "true", 0 },
{ "SuppressStartupBanner", "nologo", "", "true", 0 },
{ 0, 0, 0, 0, 0 }
};
......@@ -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")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment