2
2
3
3
cmake_minimum_required (VERSION 3.4.3 )
4
4
5
- if (POLICY CMP0022 )
6
- cmake_policy (SET CMP0022 NEW ) # automatic when 2.8.12 is required
7
- endif ()
5
+ cmake_policy (SET CMP0022 NEW )
8
6
9
- if (POLICY CMP0051 )
10
- # CMake 3.1 and higher include generator expressions of the form
11
- # $<TARGETLIB:obj> in the SOURCES property. These need to be
12
- # stripped everywhere that access the SOURCES property, so we just
13
- # defer to the OLD behavior of not including generator expressions
14
- # in the output for now.
15
- cmake_policy (SET CMP0051 OLD )
16
- endif ()
7
+ cmake_policy (SET CMP0048 NEW )
17
8
18
- if (POLICY CMP0056 )
19
- cmake_policy (SET CMP0056 NEW )
20
- endif ()
9
+ # CMake 3.1 and higher include generator expressions of the form
10
+ # $<TARGETLIB:obj> in the SOURCES property. These need to be
11
+ # stripped everywhere that access the SOURCES property, so we just
12
+ # defer to the OLD behavior of not including generator expressions
13
+ # in the output for now.
14
+ cmake_policy (SET CMP0051 OLD )
21
15
22
- if ( POLICY CMP0057 )
23
- cmake_policy ( SET CMP0057 NEW )
24
- endif ( )
16
+ cmake_policy ( SET CMP0056 NEW )
17
+
18
+ cmake_policy ( SET CMP0057 NEW )
25
19
26
20
if (NOT DEFINED LLVM_VERSION_MAJOR )
27
21
set (LLVM_VERSION_MAJOR 6 )
@@ -36,13 +30,6 @@ if(NOT DEFINED LLVM_VERSION_SUFFIX)
36
30
set (LLVM_VERSION_SUFFIX svn )
37
31
endif ()
38
32
39
- if (POLICY CMP0048 )
40
- cmake_policy (SET CMP0048 NEW )
41
- set (cmake_3_0_PROJ_VERSION
42
- VERSION ${LLVM_VERSION_MAJOR} .${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH} )
43
- set (cmake_3_0_LANGUAGES LANGUAGES )
44
- endif ()
45
-
46
33
if (NOT PACKAGE_VERSION )
47
34
set (PACKAGE_VERSION
48
35
"${LLVM_VERSION_MAJOR} .${LLVM_VERSION_MINOR} .${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX} " )
@@ -56,9 +43,8 @@ if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQ
56
43
endif ()
57
44
58
45
project (LLVM
59
- ${cmake_3_0_PROJ_VERSION}
60
- ${cmake_3_0_LANGUAGES}
61
- C CXX ASM )
46
+ VERSION ${LLVM_VERSION_MAJOR} .${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
47
+ LANGUAGES C CXX ASM )
62
48
63
49
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES )
64
50
message (STATUS "No build type selected, default to Debug" )
@@ -193,6 +179,9 @@ set(CMAKE_MODULE_PATH
193
179
# for use by clang_complete, YouCompleteMe, etc.
194
180
set (CMAKE_EXPORT_COMPILE_COMMANDS 1 )
195
181
182
+ option (LLVM_INSTALL_BINUTILS_SYMLINKS
183
+ "Install symlinks from the binutils tool names to the corresponding LLVM tools." OFF )
184
+
196
185
option (LLVM_INSTALL_UTILS "Include utility binaries in the 'install' target." OFF )
197
186
198
187
option (LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF )
@@ -766,6 +755,7 @@ configure_file(
766
755
add_custom_target (srpm
767
756
COMMAND cpack -G TGZ --config CPackSourceConfig.cmake -B ${LLVM_SRPM_DIR} /SOURCES
768
757
COMMAND rpmbuild -bs --define '_topdir ${LLVM_SRPM_DIR} ' ${LLVM_SRPM_BINARY_SPECFILE} )
758
+ set_target_properties (srpm PROPERTIES FOLDER "Misc" )
769
759
770
760
771
761
# They are not referenced. See set_output_directory().
@@ -978,6 +968,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
978
968
# Installing the headers needs to depend on generating any public
979
969
# tablegen'd headers.
980
970
add_custom_target (llvm-headers DEPENDS intrinsics_gen )
971
+ set_target_properties (llvm-headers PROPERTIES FOLDER "Misc" )
981
972
982
973
if (NOT CMAKE_CONFIGURATION_TYPES )
983
974
add_custom_target (install -llvm-headers
0 commit comments