File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -1043,18 +1043,21 @@ function Build-CMakeProject {
10431043 }
10441044 }
10451045
1046- if ($UseMSVCCompilers.Contains (" C" )) {
1047- TryAdd- KeyValue $Defines CMAKE_C_COMPILER cl
1048- if ($EnableCaching ) {
1046+ if ($EnableCaching ) {
1047+ if ($UseMSVCCompilers.Contains (" C" ) -Or $UsePinnedCompilers.Contains (" C" )) {
10491048 TryAdd- KeyValue $Defines CMAKE_C_COMPILER_LAUNCHER sccache
10501049 }
1050+ if ($UseMSVCCompilers.Contains (" CXX" ) -Or $UsePinnedCompilers.Contains (" CXX" )) {
1051+ TryAdd- KeyValue $Defines CMAKE_CXX_COMPILER_LAUNCHER sccache
1052+ }
1053+ }
1054+
1055+ if ($UseMSVCCompilers.Contains (" C" )) {
1056+ TryAdd- KeyValue $Defines CMAKE_C_COMPILER cl
10511057 Append- FlagsDefine $Defines CMAKE_C_FLAGS $CFlags
10521058 }
10531059 if ($UseMSVCCompilers.Contains (" CXX" )) {
10541060 TryAdd- KeyValue $Defines CMAKE_CXX_COMPILER cl
1055- if ($EnableCaching ) {
1056- TryAdd- KeyValue $Defines CMAKE_CXX_COMPILER_LAUNCHER sccache
1057- }
10581061 Append- FlagsDefine $Defines CMAKE_CXX_FLAGS $CXXFlags
10591062 }
10601063 if ($UsePinnedCompilers.Contains (" ASM" ) -Or $UseBuiltCompilers.Contains (" ASM" )) {
You can’t perform that action at this time.
0 commit comments