From e71c158dda9c6f697443571d14f19200b17ccead Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 29 Jul 2025 23:11:37 +0200 Subject: [PATCH] Allow building with Clang using MSVC ABI The official LLVM build of Clang is using the MSVC ABI, and if you are using clang.exe and not clang-cl.exe you get the GNU command line interface. CMake would not set the MSVC variable, but the CMAKE_CXX_SIMULATE_ID as "MSVC". Since clang.exe is targeting the MSVC ABI it needs the build support the MSVC has. --- src/gumbo/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gumbo/CMakeLists.txt b/src/gumbo/CMakeLists.txt index 9c0dc5b0..5876d34f 100644 --- a/src/gumbo/CMakeLists.txt +++ b/src/gumbo/CMakeLists.txt @@ -58,7 +58,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${HEADER_GUMBO}" ) -if (MSVC) +if (MSVC OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") target_include_directories(${PROJECT_NAME} PRIVATE visualc/include) endif()