[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Basic / CMakeLists.txt
blob5d197f59ac4f7f8f3ed8e2ed5143d52dd34ddfd6
1 set(LLVM_LINK_COMPONENTS
2   Support
3   )
5 find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
6 find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc)
8 # The VC revision include that we want to generate.
9 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
11 set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
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()
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}")
29 # Mark the generated header as being generated.
30 set_source_files_properties("${version_inc}"
31   PROPERTIES GENERATED TRUE
32              HEADER_FILE_ONLY TRUE)
34 if(CLANG_VENDOR)
35   set_source_files_properties(Version.cpp
36     PROPERTIES COMPILE_DEFINITIONS "CLANG_VENDOR=\"${CLANG_VENDOR} \"")
37 endif()
39 add_clang_library(clangBasic
40   Attributes.cpp
41   Builtins.cpp
42   CLWarnings.cpp
43   CharInfo.cpp
44   CodeGenOptions.cpp
45   Cuda.cpp
46   DarwinSDKInfo.cpp
47   Diagnostic.cpp
48   DiagnosticIDs.cpp
49   DiagnosticOptions.cpp
50   ExpressionTraits.cpp
51   FileEntry.cpp
52   FileManager.cpp
53   FileSystemStatCache.cpp
54   IdentifierTable.cpp
55   LangOptions.cpp
56   LangStandards.cpp
57   MakeSupport.cpp
58   Module.cpp
59   ObjCRuntime.cpp
60   OpenCLOptions.cpp
61   OpenMPKinds.cpp
62   OperatorPrecedence.cpp
63   ProfileList.cpp
64   NoSanitizeList.cpp
65   SanitizerSpecialCaseList.cpp
66   Sanitizers.cpp
67   Sarif.cpp
68   SourceLocation.cpp
69   SourceManager.cpp
70   Stack.cpp
71   TargetID.cpp
72   TargetInfo.cpp
73   Targets.cpp
74   Targets/AArch64.cpp
75   Targets/AMDGPU.cpp
76   Targets/ARC.cpp
77   Targets/ARM.cpp
78   Targets/AVR.cpp
79   Targets/BPF.cpp
80   Targets/CSKY.cpp
81   Targets/DirectX.cpp
82   Targets/Hexagon.cpp
83   Targets/Lanai.cpp
84   Targets/Le64.cpp
85   Targets/LoongArch.cpp
86   Targets/M68k.cpp
87   Targets/MSP430.cpp
88   Targets/Mips.cpp
89   Targets/NVPTX.cpp
90   Targets/OSTargets.cpp
91   Targets/PNaCl.cpp
92   Targets/PPC.cpp
93   Targets/RISCV.cpp
94   Targets/SPIR.cpp
95   Targets/Sparc.cpp
96   Targets/SystemZ.cpp
97   Targets/TCE.cpp
98   Targets/VE.cpp
99   Targets/WebAssembly.cpp
100   Targets/X86.cpp
101   Targets/XCore.cpp
102   TokenKinds.cpp
103   TypeTraits.cpp
104   Version.cpp
105   Warnings.cpp
106   XRayInstr.cpp
107   XRayLists.cpp
108   ${version_inc}
110   DEPENDS
111   omp_gen
112   )