Skip to content

Commit

Permalink
build/cmake/DefinePlatformSpecifc.cmake: Separated MSVC and Clang-Cl …
Browse files Browse the repository at this point in the history
…settings for Windows
  • Loading branch information
emmenlau committed Oct 11, 2023
1 parent 7b8c042 commit c5a5f79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/cmake/DefinePlatformSpecifc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix")

# basic options
foreach(lang IN ITEMS C CXX)
if("CMAKE_${lang}_COMPILER_ID" STREQUAL "MSVC" OR "${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "MSVC")
if("CMAKE_${lang}_COMPILER_ID" STREQUAL "MSVC")
# These flags are not supported (or needed) with Clang-Cl on Windows:
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} /MP") # parallel build
endif()

if("CMAKE_${lang}_COMPILER_ID" STREQUAL "MSVC" OR "${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "MSVC")
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} /W3") # warning level 3
include(CheckCXXCompilerFlag)
set(CMAKE_REQUIRED_QUIET ON)
Expand Down

0 comments on commit c5a5f79

Please sign in to comment.