summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-03 21:10:15 +0000
committered <ed@FreeBSD.org>2009-06-03 21:10:15 +0000
commit1941b8772a36a33c7b86cb67163cd735b3d57221 (patch)
treedb103e2a0755ab86f18c181a2d208a6a63284c97 /CMakeLists.txt
parent036fdcfb2d357cecb320b5a6fd05f4859a63aeba (diff)
downloadFreeBSD-src-1941b8772a36a33c7b86cb67163cd735b3d57221.zip
FreeBSD-src-1941b8772a36a33c7b86cb67163cd735b3d57221.tar.gz
Import LLVM, at r72805, which fixes PR4315 and PR4316.
Normally I'm not updating sources this often, but I want to get rid of this breakage, because right now I can't offer a proper source snapshot yet.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6af569b..ba63484 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,6 +17,8 @@ This process created the file `CMakeCache.txt' and the directory `CMakeFiles'.
Please delete them.")
endif()
+string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
+
include(FindPerl)
set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
@@ -55,6 +57,16 @@ endif( MSVC )
option(LLVM_ENABLE_THREADS "Use threads if available." ON)
+if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+ option(LLVM_ENABLE_ASSERTS "Enable asserts" OFF)
+else()
+ option(LLVM_ENABLE_ASSERTS "Enable asserts" ON)
+endif()
+
+if( LLVM_ENABLE_ASSERTS )
+ add_definitions( -D_DEBUG -UNDEBUG )
+endif()
+
if( LLVM_TARGETS_TO_BUILD STREQUAL "all" )
set( LLVM_TARGETS_TO_BUILD ${LLVM_ALL_TARGETS} )
endif()
OpenPOWER on IntegriCloud