vcpkg/ports/avisynthplus/clang-cl.patch
Alexander Neumann 6a29f32abb
[avisynthplus] fix clang-cl/intel with ninja generator (#26092)
* avisynthplus fix for clang-cl

* v db
2022-08-03 16:00:49 -07:00

21 lines
808 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d60332e63..0216970fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -188,7 +188,15 @@ endif()
endif()
ENDIF()
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
+ set(CLANG_IN_VS "1")
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
+ set(IntelLLVM_IN_VS "1")
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
+ set(IntelClassic_IN_VS "1")
+ endif()
+
IF(CLANG_IN_VS STREQUAL "1")
#these are unknown
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexceptions")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")