- # Use ${cmake_2_8_12_KEYWORD} intead of KEYWORD in target_link_libraries().
- set(cmake_2_8_12_INTERFACE INTERFACE)
- set(cmake_2_8_12_PRIVATE PRIVATE)
- if(POLICY CMP0022)
- cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
+ set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
+endif()
+
+if(NOT DEFINED LLVM_VERSION_MAJOR)
+ set(LLVM_VERSION_MAJOR 3)
+endif()
+if(NOT DEFINED LLVM_VERSION_MINOR)
+ set(LLVM_VERSION_MINOR 8)
+endif()
+if(NOT DEFINED LLVM_VERSION_PATCH)
+ set(LLVM_VERSION_PATCH 0)
+endif()
+if(NOT DEFINED LLVM_VERSION_SUFFIX)
+ set(LLVM_VERSION_SUFFIX svn)
+endif()
+
+if (POLICY CMP0048)
+ cmake_policy(SET CMP0048 NEW)
+ set(cmake_3_0_PROJ_VERSION
+ VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH})
+ set(cmake_3_0_LANGUAGES LANGUAGES)
+endif()
+
+if (NOT PACKAGE_VERSION)
+ set(PACKAGE_VERSION
+ "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}")
+endif()
+
+project(LLVM
+ ${cmake_3_0_PROJ_VERSION}
+ ${cmake_3_0_LANGUAGES}
+ C CXX ASM)
+
+# The following only works with the Ninja generator in CMake >= 3.0.
+set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
+ "Define the maximum number of concurrent compilation jobs.")
+if(LLVM_PARALLEL_COMPILE_JOBS)
+ if(CMAKE_VERSION VERSION_LESS 3.0 OR NOT CMAKE_MAKE_PROGRAM MATCHES "ninja")
+ message(WARNING "Job pooling is only available with Ninja generators and CMake 3.0 and later.")
+ else()
+ set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${LLVM_PARALLEL_COMPILE_JOBS})
+ set(CMAKE_JOB_POOL_COMPILE compile_job_pool)