Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separated MSVC and clang-cl settings for Windows #2865

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading