cmake_minimum_required(VERSION 2.8.8)
+if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+ message(STATUS "No build type selected, default to Debug")
+ set(CMAKE_BUILD_TYPE "Debug")
+endif()
+
# FIXME: It may be removed when we use 2.8.12.
if(CMAKE_VERSION VERSION_LESS 2.8.12)
# Invalidate a couple of keywords.
endif()
endif()
+if (POLICY CMP0051)
+ # CMake 3.1 and higher include generator expressions of the form
+ # $<TARGETLIB:obj> in the SOURCES property. These need to be
+ # stripped everywhere that access the SOURCES property, so we just
+ # defer to the OLD behavior of not including generator expressions
+ # in the output for now.
+ cmake_policy(SET CMP0051 OLD)
+endif()
+
if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
set(cmake_3_2_USES_TERMINAL)
else()
)
set(LLVM_VERSION_MAJOR 3)
-set(LLVM_VERSION_MINOR 6)
+set(LLVM_VERSION_MINOR 7)
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}svn")
"ExecWait '$INSTDIR/tools/msbuild/install.bat'")
set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
"ExecWait '$INSTDIR/tools/msbuild/uninstall.bat'")
+ if( CMAKE_CL_64 )
+ set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+ endif()
endif()
include(CPack)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY include/llvm include/llvm-c
DESTINATION include
+ COMPONENT llvm-headers
FILES_MATCHING
PATTERN "*.def"
PATTERN "*.h"
install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm
DESTINATION include
+ COMPONENT llvm-headers
FILES_MATCHING
PATTERN "*.def"
PATTERN "*.h"
PATTERN "config.h" EXCLUDE
PATTERN ".svn" EXCLUDE
)
+
+ if (NOT CMAKE_CONFIGURATION_TYPES)
+ add_custom_target(installhdrs
+ DEPENDS ${name}
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=llvm-headers
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ endif()
endif()