+set(C_INCLUDE_DIRS "" CACHE STRING
+ "Colon separated list of directories clang will search for headers.")
+
+set(LLVM_TARGET_ARCH "host"
+ CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.")
+
+option(LLVM_ENABLE_THREADS "Use threads if available." ON)
+
+if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+ option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
+else()
+ option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
+endif()
+
+if( LLVM_ENABLE_ASSERTIONS )
+ # MSVC doesn't like _DEBUG on release builds. See PR 4379.
+ if( NOT MSVC )
+ add_definitions( -D_DEBUG )
+ endif()
+ # On Release builds cmake automatically defines NDEBUG, so we
+ # explicitly undefine it:
+ if( uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+ add_definitions( -UNDEBUG )
+ endif()
+else()
+ if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE" )
+ add_definitions( -DNDEBUG )
+ endif()
+endif()