Skip to content

Commit 842dad2

Browse files
committed
[interpreter] Decouple Cling assertions from LLVM_BUILD_TYPE
Reset CMAKE_BUILD_TYPE after LLVM to make Cling (and CppInterOp) follow the general ROOT build type and the asserts option. This allows having Cling assertions even with RelWithDebInfo builds, the default LLVM_BUILD_TYPE=Release, and asserts=ON (as we have in the CI).
1 parent 1a06266 commit 842dad2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

interpreter/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ if(builtin_llvm)
190190
# in production builds.
191191
set(LLVM_UNREACHABLE_OPTIMIZE FALSE)
192192

193+
set(_build_type ${CMAKE_BUILD_TYPE})
194+
193195
# Multi-configuration generators ignore CMAKE_BUILD_TYPE, so
194196
# in that case we set the flags for all configurations to the
195197
# flags of the build type assigned to LLVM_BUILD_TYPE.
@@ -241,6 +243,7 @@ if(builtin_llvm)
241243
endif()
242244

243245
set(CMAKE_CXX_STANDARD ${_cxx_standard})
246+
set(CMAKE_BUILD_TYPE ${_build_type})
244247

245248
set(LLVM_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/llvm-project/llvm/include
246249
${CMAKE_CURRENT_BINARY_DIR}/llvm-project/llvm/include

0 commit comments

Comments
 (0)