150
|
1 set(LLVM_LINK_COMPONENTS
|
|
2 Support
|
|
3 )
|
|
4
|
|
5 find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
|
|
6 find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc)
|
|
7
|
|
8 # The VC revision include that we want to generate.
|
|
9 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
|
|
10
|
|
11 set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
|
|
12
|
|
13 if(llvm_vc AND LLVM_APPEND_VC_REV)
|
|
14 set(llvm_source_dir ${LLVM_MAIN_SRC_DIR})
|
|
15 endif()
|
|
16 if(clang_vc AND LLVM_APPEND_VC_REV)
|
|
17 set(clang_source_dir ${CLANG_SOURCE_DIR})
|
|
18 endif()
|
|
19
|
|
20 # Create custom target to generate the VC revision include.
|
|
21 add_custom_command(OUTPUT "${version_inc}"
|
|
22 DEPENDS "${llvm_vc}" "${clang_vc}" "${generate_vcs_version_script}"
|
|
23 COMMAND ${CMAKE_COMMAND} "-DNAMES=\"LLVM;CLANG\""
|
|
24 "-DLLVM_SOURCE_DIR=${llvm_source_dir}"
|
|
25 "-DCLANG_SOURCE_DIR=${clang_source_dir}"
|
|
26 "-DHEADER_FILE=${version_inc}"
|
|
27 -P "${generate_vcs_version_script}")
|
|
28
|
|
29 # Mark the generated header as being generated.
|
|
30 set_source_files_properties("${version_inc}"
|
|
31 PROPERTIES GENERATED TRUE
|
|
32 HEADER_FILE_ONLY TRUE)
|
|
33
|
221
|
34 if(CLANG_VENDOR)
|
|
35 set_source_files_properties(Version.cpp
|
|
36 PROPERTIES COMPILE_DEFINITIONS "CLANG_VENDOR=\"${CLANG_VENDOR} \"")
|
|
37 endif()
|
150
|
38
|
|
39 add_clang_library(clangBasic
|
|
40 Attributes.cpp
|
|
41 Builtins.cpp
|
|
42 CharInfo.cpp
|
|
43 CodeGenOptions.cpp
|
|
44 Cuda.cpp
|
|
45 Diagnostic.cpp
|
|
46 DiagnosticIDs.cpp
|
|
47 DiagnosticOptions.cpp
|
221
|
48 ExpressionTraits.cpp
|
|
49 FileEntry.cpp
|
150
|
50 FileManager.cpp
|
|
51 FileSystemStatCache.cpp
|
|
52 IdentifierTable.cpp
|
|
53 LangOptions.cpp
|
|
54 LangStandards.cpp
|
|
55 Module.cpp
|
|
56 ObjCRuntime.cpp
|
221
|
57 OpenCLOptions.cpp
|
150
|
58 OpenMPKinds.cpp
|
|
59 OperatorPrecedence.cpp
|
221
|
60 ProfileList.cpp
|
|
61 NoSanitizeList.cpp
|
150
|
62 SanitizerSpecialCaseList.cpp
|
|
63 Sanitizers.cpp
|
|
64 SourceLocation.cpp
|
|
65 SourceManager.cpp
|
|
66 Stack.cpp
|
221
|
67 TargetID.cpp
|
150
|
68 TargetInfo.cpp
|
|
69 Targets.cpp
|
|
70 Targets/AArch64.cpp
|
|
71 Targets/AMDGPU.cpp
|
|
72 Targets/ARC.cpp
|
|
73 Targets/ARM.cpp
|
|
74 Targets/AVR.cpp
|
|
75 Targets/BPF.cpp
|
|
76 Targets/Hexagon.cpp
|
|
77 Targets/Lanai.cpp
|
|
78 Targets/Le64.cpp
|
221
|
79 Targets/M68k.cpp
|
150
|
80 Targets/MSP430.cpp
|
|
81 Targets/Mips.cpp
|
|
82 Targets/NVPTX.cpp
|
|
83 Targets/OSTargets.cpp
|
|
84 Targets/PNaCl.cpp
|
|
85 Targets/PPC.cpp
|
|
86 Targets/RISCV.cpp
|
|
87 Targets/SPIR.cpp
|
|
88 Targets/Sparc.cpp
|
|
89 Targets/SystemZ.cpp
|
|
90 Targets/TCE.cpp
|
221
|
91 Targets/VE.cpp
|
150
|
92 Targets/WebAssembly.cpp
|
|
93 Targets/X86.cpp
|
|
94 Targets/XCore.cpp
|
|
95 TokenKinds.cpp
|
221
|
96 TypeTraits.cpp
|
150
|
97 Version.cpp
|
|
98 Warnings.cpp
|
|
99 XRayInstr.cpp
|
|
100 XRayLists.cpp
|
|
101 ${version_inc}
|
221
|
102
|
|
103 DEPENDS
|
|
104 omp_gen
|
150
|
105 )
|
|
106
|