cmake_policy(SET CMP0051 OLD)
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(CMAKE_VERSION VERSION_LESS 3.1.20141117)
set(cmake_3_2_USES_TERMINAL)
else()
set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
endif()
-project(LLVM C CXX ASM)
+set(LLVM_VERSION_MAJOR 3)
+set(LLVM_VERSION_MINOR 8)
+set(LLVM_VERSION_PATCH 0)
+set(LLVM_VERSION_SUFFIX svn)
+
+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
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules"
)
-set(LLVM_VERSION_MAJOR 3)
-set(LLVM_VERSION_MINOR 8)
-set(LLVM_VERSION_PATCH 0)
-set(LLVM_VERSION_SUFFIX svn)
-
-if (NOT PACKAGE_VERSION)
- set(PACKAGE_VERSION
- "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}")
-endif()
-
option(LLVM_INSTALL_UTILS "Include utility binaries in the 'install' target." OFF)
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)