Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2019-08-01 17:03:52 +0300
committertamasmeszaros <meszaros.q@gmail.com>2019-08-01 17:03:52 +0300
commit7d25d8c677cc0edbba469e2a54658ed9468efa60 (patch)
tree9597677d64fa92fa534c62eab627699f044d4f8c /CMakeLists.txt
parentec9117cc06e5b268d5c5b1170312c922fe3e892b (diff)
Can build with (original llvm) clang-cl on windows
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbb0e2ec4..a29a144fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,8 +52,14 @@ if (SLIC3R_GUI)
add_definitions(-DSLIC3R_GUI)
endif ()
+if (MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
+ set(IS_CLANG_CL TRUE)
+else ()
+ set(IS_CLANG_CL FALSE)
+endif ()
+
if (MSVC)
- if (SLIC3R_MSVC_COMPILE_PARALLEL)
+ if (SLIC3R_MSVC_COMPILE_PARALLEL AND NOT IS_CLANG_CL)
add_compile_options(/MP)
endif ()
# /bigobj (Increase Number of Sections in .Obj file)
@@ -148,7 +154,7 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals" )
endif()
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder" )
@@ -168,7 +174,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATC
add_compile_options(-Wno-unknown-pragmas)
endif()
-
if (SLIC3R_ASAN)
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")