VS: Add compiler flag table entry for -FI followed by separate argument
The MSVC `/FI` flag accepts an attached value or a following argument. Previously our flag tables only had entries for the former. Add the latter. Fixes: #23382
This commit is contained in:
parent
6e1be5dbef
commit
20cd951c9f
@ -860,6 +860,17 @@
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue",
|
||||
"UserRequired",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ForcedIncludeFiles",
|
||||
"switch": "FI",
|
||||
"comment": "Forced Include File",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserFollowing",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
|
@ -923,6 +923,17 @@
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue",
|
||||
"UserRequired",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ForcedIncludeFiles",
|
||||
"switch": "FI",
|
||||
"comment": "Forced Include File",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserFollowing",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
|
@ -937,6 +937,17 @@
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue",
|
||||
"UserRequired",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ForcedIncludeFiles",
|
||||
"switch": "FI",
|
||||
"comment": "Forced Include File",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserFollowing",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
|
@ -972,6 +972,17 @@
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue",
|
||||
"UserRequired",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ForcedIncludeFiles",
|
||||
"switch": "FI",
|
||||
"comment": "Forced Include File",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserFollowing",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
|
@ -1077,6 +1077,17 @@
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue",
|
||||
"UserRequired",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ForcedIncludeFiles",
|
||||
"switch": "FI",
|
||||
"comment": "Forced Include File",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserFollowing",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
|
@ -1286,6 +1286,17 @@
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue",
|
||||
"UserRequired",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ForcedIncludeFiles",
|
||||
"switch": "FI",
|
||||
"comment": "Forced Include File",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserFollowing",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
|
@ -1285,6 +1285,17 @@
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserValue",
|
||||
"UserRequired",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ForcedIncludeFiles",
|
||||
"switch": "FI",
|
||||
"comment": "Forced Include File",
|
||||
"value": "",
|
||||
"flags": [
|
||||
"UserFollowing",
|
||||
"SemicolonAppendable"
|
||||
]
|
||||
},
|
||||
|
@ -35,6 +35,7 @@ run_cmake(VsProjectImport)
|
||||
run_cmake(VsPackageReferences)
|
||||
run_cmake(VsDpiAware)
|
||||
run_cmake(VsDpiAwareBadParam)
|
||||
run_cmake(VsForceInclude)
|
||||
run_cmake(VsPrecompileHeaders)
|
||||
run_cmake(VsPrecompileHeadersReuseFromCompilePDBName)
|
||||
run_cmake(VsDeployEnabled)
|
||||
|
18
Tests/RunCMake/VS10Project/VsForceInclude-check.cmake
Normal file
18
Tests/RunCMake/VS10Project/VsForceInclude-check.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
set(tgt_project "${RunCMake_TEST_BINARY_DIR}/tgt.vcxproj")
|
||||
if (NOT EXISTS "${tgt_project}")
|
||||
set(RunCMake_TEST_FAILED "Generated project file does not exist:\n ${tgt_project}\n")
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(STRINGS ${tgt_project} tgt_projects_strings REGEX ForcedIncludeFiles)
|
||||
|
||||
foreach(line IN LISTS tgt_projects_strings)
|
||||
if (line MATCHES "<ForcedIncludeFiles>force_include_1.h;force_include_2.h</ForcedIncludeFiles>")
|
||||
set(have_FI ON)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (NOT have_FI)
|
||||
set(RunCMake_TEST_FAILED "Generated project does not have expected ForcedIncludeFiles.")
|
||||
return()
|
||||
endif()
|
5
Tests/RunCMake/VS10Project/VsForceInclude.cmake
Normal file
5
Tests/RunCMake/VS10Project/VsForceInclude.cmake
Normal file
@ -0,0 +1,5 @@
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(tgt STATIC empty.cxx)
|
||||
target_compile_options(tgt PRIVATE "SHELL:/FI force_include_1.h")
|
||||
target_compile_options(tgt PRIVATE "/FIforce_include_2.h")
|
Loading…
Reference in New Issue
Block a user