diff options
author | laikh <dlshcbmuipmam@hotmail.com> | 2020-08-05 11:15:20 +0800 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2020-09-01 09:45:48 +0100 |
commit | 6358ae47ded95c19d5e3868144cfe189aafe16b0 (patch) | |
tree | 6abf987c7d595243624ff6ecb0fbc006d3c3d62e /cmake/CompileFlags.cmake | |
parent | ab420d8cc01a81ad872a14afb8cb3e56afbc8dec (diff) | |
download | openttd-6358ae47ded95c19d5e3868144cfe189aafe16b0.tar.xz |
Fix: Remove /MP flag and improve FindEditbin.cmake for Windows clang-cl build
Diffstat (limited to 'cmake/CompileFlags.cmake')
-rw-r--r-- | cmake/CompileFlags.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmake/CompileFlags.cmake b/cmake/CompileFlags.cmake index 4adc4a31a..49ae1d767 100644 --- a/cmake/CompileFlags.cmake +++ b/cmake/CompileFlags.cmake @@ -23,8 +23,10 @@ macro(compile_flags) # C++11 standard". We need C++11 for the way we use threads. add_compile_options(/Zc:rvalueCast) - # Enable multi-threaded compilation. - add_compile_options(/MP) + if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # Enable multi-threaded compilation. + add_compile_options(/MP) + endif(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # Add DPI manifest to project; other WIN32 targets get this via ottdres.rc list(APPEND GENERATED_SOURCE_FILES "${CMAKE_SOURCE_DIR}/os/windows/openttd.manifest") |