Files
CMake/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
Brad King 54e7008e2d Merge topic 'vs-cleanup'
78d9564d50 cmGlobalVisualStudio7Generator: Inline short method at only call site
034cc29b89 cmGlobalVisualStudio7Generator: Constify .sln write methods
5004602715 cmGlobalVisualStudio7Generator: Factor folder collection out of write method
6ae4ed30d9 cmGlobalVisualStudio7Generator: Factor target collection out of write method
5582eb292e cmGlobalVisualStudio7Generator: Update outdated comment
2297ba9399 cmGlobalVisualStudio7Generator: Remove redundant C++ modules check
ccbd61dd53 cmGlobalVisualStudio7Generator: Remove unused member
93e34a5e0e cmGlobalGenerator: Constify GetTargetDirectDepends
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11130
2025-09-02 10:56:09 -04:00

114 lines
3.6 KiB
CMake

include(RunCMake)
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.27)
run_cmake(LanguageStandard)
endif()
run_cmake(CustomCommandGenex)
if(NOT RunCMake_GENERATOR MATCHES "^Visual Studio 1[1-5] ")
run_cmake(CustomCommandParallel)
run_cmake(CustomCommandParallelDisable)
endif()
run_cmake_with_options(VsCharacterSet -DSET_CHARSET=MultiByte)
run_cmake_with_options(VsCharacterSet -DSET_CHARSET=Unicode)
run_cmake_with_options(VsCharacterSet -DSET_CHARSET=NotSet)
run_cmake(VsCsharpSourceGroup)
run_cmake(VsCSharpCompilerOpts)
run_cmake(ExplicitCMakeLists)
run_cmake(InterfaceLibSources)
run_cmake(NoImpLib)
run_cmake(RuntimeLibrary)
run_cmake(SolutionItems)
run_cmake(SourceGroupCMakeLists)
run_cmake(SourceGroupTreeCMakeLists)
run_cmake(SourceGroupFileSet)
run_cmake(VsConfigurationType)
run_cmake(VsTargetsFileReferences)
run_cmake(VsCustomProps)
run_cmake(VsDebuggerWorkingDir)
run_cmake(VsDebuggerCommand)
run_cmake(VsDebuggerCommandArguments)
run_cmake(VsDebuggerEnvironment)
run_cmake(VsCSharpCustomTags)
run_cmake(VsCSharpDocumentationFile)
run_cmake(VsCSharpReferenceProps)
run_cmake(VsCSharpWithoutSources)
run_cmake(VsCSharpDeployFiles)
run_cmake(VSCSharpDefines)
run_cmake(VsDefaultFlags)
run_cmake(VsSdkDirectories)
run_cmake(VsGlobals)
run_cmake(VsProjectImport)
run_cmake(VsPackageReferences)
run_cmake(VsDpiAware)
run_cmake(VsDpiAwareBadParam)
run_cmake(VsForceInclude)
run_cmake(VsPrecompileHeaders)
run_cmake(VsPrecompileHeadersShort)
run_cmake(VsDeployEnabled)
run_cmake(VsSettings)
run_cmake(VsSourceSettingsTool)
run_cmake(VsPlatformToolset)
run_cmake(VsControlFlowGuardLinkSetting)
run_cmake(VsToolOverride)
run_cmake(VsImageVersion)
run_cmake(VsWinRTByDefault)
block()
set(RunCMake_GENERATOR_TOOLSET "VCTargetsPath=$(VCTargetsPath)")
run_cmake(VsVCTargetsPath)
endblock()
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.05)
run_cmake(VsJustMyCode)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.20)
run_cmake(VsSpectreMitigation)
endif()
# Visual Studio 2017 has toolset version 141
if (RunCMake_GENERATOR MATCHES "Visual Studio 1[0-4] 201[0-5]" OR
(RunCMake_GENERATOR_TOOLSET MATCHES "^v([0-9]+)" AND CMAKE_MATCH_1 LESS 141))
run_cmake(UnityBuildPre2017)
else()
run_cmake(UnityBuildNative)
run_cmake(UnityBuildNativeShort)
run_cmake(UnityBuildNativeGrouped)
run_cmake(UnityBuildNativeGroupedShort)
function(run_UnityBuildPCH suffix)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/UnityBuildPCH${suffix}-build)
run_cmake(UnityBuildPCH${suffix})
set(RunCMake_TEST_NO_CLEAN 1)
set(vcxproj "${RunCMake_TEST_BINARY_DIR}/UnityBuildPCH.vcxproj")
if(EXISTS "${vcxproj}")
file(STRINGS ${vcxproj} vcxproj_strings REGEX "ClCompile[^\n]*UnityBuildPCH\\.c")
endif()
if(vcxproj_strings MATCHES "Include=\"([^\"]+)\"")
set(src "${CMAKE_MATCH_1}")
run_cmake_command(UnityBuildPCH${suffix}-build ${CMAKE_COMMAND} --build . --config Debug --target UnityBuildPCH -- -t:ClCompile -p:SelectedFiles=${src})
endif()
endfunction()
run_UnityBuildPCH("")
run_UnityBuildPCH(Short)
endif()
run_cmake(VsDotnetStartupObject)
run_cmake(VsDotnetTargetFramework)
run_cmake(VsDotnetTargetFrameworkVersion)
run_cmake(VsNoCompileBatching)
run_cmake(DebugInformationFormat)
run_cmake(VsCLREmpty)
run_cmake(VsCLRPure)
run_cmake(VsCLRSafe)
run_cmake(VsFrameworkReference)
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.20)
run_cmake(VsCLRNetcore)
endif()
run_cmake(NoImpLibShort)
run_cmake(RuntimeLibraryShort)