150
|
1 set(LLVM_LINK_COMPONENTS
|
|
2 Core
|
|
3 MC
|
|
4 Support
|
|
5 )
|
|
6
|
|
7 find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
|
|
8 find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc)
|
|
9
|
|
10 # The VC revision include that we want to generate.
|
|
11 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
|
|
12
|
|
13 set(generate_vcs_version_script "${LLVM_CMAKE_PATH}/GenerateVersionFromVCS.cmake")
|
|
14
|
|
15 if(llvm_vc AND LLVM_APPEND_VC_REV)
|
|
16 set(llvm_source_dir ${LLVM_MAIN_SRC_DIR})
|
|
17 endif()
|
|
18 if(clang_vc AND LLVM_APPEND_VC_REV)
|
|
19 set(clang_source_dir ${CLANG_SOURCE_DIR})
|
|
20 endif()
|
|
21
|
|
22 # Create custom target to generate the VC revision include.
|
|
23 add_custom_command(OUTPUT "${version_inc}"
|
|
24 DEPENDS "${llvm_vc}" "${clang_vc}" "${generate_vcs_version_script}"
|
|
25 COMMAND ${CMAKE_COMMAND} "-DNAMES=\"LLVM;CLANG\""
|
|
26 "-DLLVM_SOURCE_DIR=${llvm_source_dir}"
|
|
27 "-DCLANG_SOURCE_DIR=${clang_source_dir}"
|
|
28 "-DHEADER_FILE=${version_inc}"
|
|
29 -P "${generate_vcs_version_script}")
|
|
30
|
|
31 # Mark the generated header as being generated.
|
|
32 set_source_files_properties("${version_inc}"
|
|
33 PROPERTIES GENERATED TRUE
|
|
34 HEADER_FILE_ONLY TRUE)
|
|
35
|
|
36 set_property(SOURCE Version.cpp APPEND PROPERTY
|
|
37 COMPILE_DEFINITIONS "HAVE_VCS_VERSION_INC")
|
|
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
|
|
48 FileManager.cpp
|
|
49 FileSystemStatCache.cpp
|
|
50 FixedPoint.cpp
|
|
51 IdentifierTable.cpp
|
|
52 LangOptions.cpp
|
|
53 LangStandards.cpp
|
|
54 Module.cpp
|
|
55 ObjCRuntime.cpp
|
|
56 OpenMPKinds.cpp
|
|
57 OperatorPrecedence.cpp
|
|
58 SanitizerBlacklist.cpp
|
|
59 SanitizerSpecialCaseList.cpp
|
|
60 Sanitizers.cpp
|
|
61 SourceLocation.cpp
|
|
62 SourceManager.cpp
|
|
63 Stack.cpp
|
|
64 TargetInfo.cpp
|
|
65 Targets.cpp
|
|
66 Targets/AArch64.cpp
|
|
67 Targets/AMDGPU.cpp
|
|
68 Targets/ARC.cpp
|
|
69 Targets/ARM.cpp
|
|
70 Targets/AVR.cpp
|
|
71 Targets/BPF.cpp
|
|
72 Targets/Hexagon.cpp
|
|
73 Targets/Lanai.cpp
|
|
74 Targets/Le64.cpp
|
|
75 Targets/MSP430.cpp
|
|
76 Targets/Mips.cpp
|
|
77 Targets/NVPTX.cpp
|
|
78 Targets/OSTargets.cpp
|
|
79 Targets/PNaCl.cpp
|
|
80 Targets/PPC.cpp
|
|
81 Targets/RISCV.cpp
|
|
82 Targets/SPIR.cpp
|
|
83 Targets/Sparc.cpp
|
|
84 Targets/SystemZ.cpp
|
|
85 Targets/TCE.cpp
|
|
86 Targets/WebAssembly.cpp
|
|
87 Targets/X86.cpp
|
|
88 Targets/XCore.cpp
|
|
89 TokenKinds.cpp
|
|
90 Version.cpp
|
|
91 Warnings.cpp
|
|
92 XRayInstr.cpp
|
|
93 XRayLists.cpp
|
|
94 ${version_inc}
|
|
95 )
|
|
96
|