From 3b3c1f51d0530cf6cd72f095629f08736a4c9642 Mon Sep 17 00:00:00 2001 From: Bertrand Bellenot Date: Tue, 25 Nov 2025 16:22:18 +0100 Subject: [PATCH] [cmake][win] Fix build of standalone Cling --- interpreter/CMakeLists.txt | 1 - interpreter/cling/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/interpreter/CMakeLists.txt b/interpreter/CMakeLists.txt index 2dc0c360d414b..0b25b2f2e4465 100644 --- a/interpreter/CMakeLists.txt +++ b/interpreter/CMakeLists.txt @@ -106,7 +106,6 @@ if(MSVC) # replace dashes in the -EH* and -GR* flags with slashes (/EH* /GR*) string(REPLACE " -EH" " /EH" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE " -GR" " /GR" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D CLANG_EXPORTS=1") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4049,4206,4217,4221") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ignore:4049,4206,4217,4221") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /ignore:4049,4206,4217,4221") diff --git a/interpreter/cling/CMakeLists.txt b/interpreter/cling/CMakeLists.txt index fe6c373c422a1..dec4bb4cfa125 100644 --- a/interpreter/cling/CMakeLists.txt +++ b/interpreter/cling/CMakeLists.txt @@ -242,7 +242,7 @@ endif() if(MSVC) add_definitions(/DNOMINMAX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor /D CLANG_EXPORTS=1") endif() if (APPLE)