[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / lib / Basic / CMakeLists.txt
blob36ccf7d0809453ecd232369e227be97d2df35c61
1 set(LLVM_LINK_COMPONENTS
2   Support
3   TargetParser
4   )
6 find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
7 find_first_existing_vc_file("${CLANG_SOURCE_DIR}" clang_vc)
9 # The VC revision include that we want to generate.
10 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
12 set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
14 if(llvm_vc AND LLVM_APPEND_VC_REV)
15   set(llvm_source_dir ${LLVM_MAIN_SRC_DIR})
16 endif()
17 if (LLVM_VC_REPOSITORY AND LLVM_VC_REVISION)
18   set(llvm_source_dir ${LLVM_SOURCE_DIR})
19   set(llvm_vc_repository ${LLVM_VC_REPOSITORY})
20   set(llvm_vc_revision ${LLVM_VC_REVISION})
21 endif()
22 if(clang_vc AND LLVM_APPEND_VC_REV)
23   set(clang_source_dir ${CLANG_SOURCE_DIR})
24 endif()
25 if (CLANG_VC_REPOSITORY AND CLANG_VC_REVISION)
26   set(clang_source_dir ${CLANG_SOURCE_DIR})
27   set(clang_vc_repository ${CLANG_VC_REPOSITORY})
28   set(clang_vc_revision ${CLANG_VC_REVISION})
29 endif()
31 # Create custom target to generate the VC revision include.
32 add_custom_command(OUTPUT "${version_inc}"
33   DEPENDS "${llvm_vc}" "${clang_vc}" "${generate_vcs_version_script}"
34   COMMAND ${CMAKE_COMMAND} "-DNAMES=\"LLVM;CLANG\""
35                            "-DLLVM_SOURCE_DIR=${llvm_source_dir}"
36                            "-DCLANG_SOURCE_DIR=${clang_source_dir}"
37                            "-DCLANG_VC_REPOSITORY=${clang_vc_repository}"
38                            "-DCLANG_VC_REVISION=${clang_vc_revision}"
39                            "-DHEADER_FILE=${version_inc}"
40                            "-DLLVM_VC_REPOSITORY=${llvm_vc_repository}"
41                            "-DLLVM_VC_REVISION=${llvm_vc_revision}"
42                            "-DLLVM_FORCE_VC_REVISION=${LLVM_FORCE_VC_REVISION}"
43                            "-DLLVM_FORCE_VC_REPOSITORY=${LLVM_FORCE_VC_REPOSITORY}"
44                            -P "${generate_vcs_version_script}")
46 # Mark the generated header as being generated.
47 set_source_files_properties("${version_inc}"
48   PROPERTIES GENERATED TRUE
49              HEADER_FILE_ONLY TRUE)
51 if(CLANG_VENDOR)
52   set_source_files_properties(Version.cpp
53     PROPERTIES COMPILE_DEFINITIONS "CLANG_VENDOR=\"${CLANG_VENDOR} \"")
54 endif()
56 add_clang_library(clangBasic
57   Attributes.cpp
58   Builtins.cpp
59   CLWarnings.cpp
60   CharInfo.cpp
61   CodeGenOptions.cpp
62   Cuda.cpp
63   DarwinSDKInfo.cpp
64   Diagnostic.cpp
65   DiagnosticIDs.cpp
66   DiagnosticOptions.cpp
67   ExpressionTraits.cpp
68   FileEntry.cpp
69   FileManager.cpp
70   FileSystemStatCache.cpp
71   IdentifierTable.cpp
72   LangOptions.cpp
73   LangStandards.cpp
74   MakeSupport.cpp
75   Module.cpp
76   ObjCRuntime.cpp
77   OpenCLOptions.cpp
78   OpenMPKinds.cpp
79   OperatorPrecedence.cpp
80   ParsedAttrInfo.cpp
81   ProfileList.cpp
82   NoSanitizeList.cpp
83   SanitizerSpecialCaseList.cpp
84   Sanitizers.cpp
85   Sarif.cpp
86   SourceLocation.cpp
87   SourceManager.cpp
88   Stack.cpp
89   TargetID.cpp
90   TargetInfo.cpp
91   Targets.cpp
92   Targets/AArch64.cpp
93   Targets/AMDGPU.cpp
94   Targets/ARC.cpp
95   Targets/ARM.cpp
96   Targets/AVR.cpp
97   Targets/BPF.cpp
98   Targets/CSKY.cpp
99   Targets/DirectX.cpp
100   Targets/Hexagon.cpp
101   Targets/Lanai.cpp
102   Targets/Le64.cpp
103   Targets/LoongArch.cpp
104   Targets/M68k.cpp
105   Targets/MSP430.cpp
106   Targets/Mips.cpp
107   Targets/NVPTX.cpp
108   Targets/OSTargets.cpp
109   Targets/PNaCl.cpp
110   Targets/PPC.cpp
111   Targets/RISCV.cpp
112   Targets/SPIR.cpp
113   Targets/Sparc.cpp
114   Targets/SystemZ.cpp
115   Targets/TCE.cpp
116   Targets/VE.cpp
117   Targets/WebAssembly.cpp
118   Targets/X86.cpp
119   Targets/XCore.cpp
120   TokenKinds.cpp
121   TypeTraits.cpp
122   Version.cpp
123   Warnings.cpp
124   XRayInstr.cpp
125   XRayLists.cpp
126   ${version_inc}
128   DEPENDS
129   omp_gen
130   ClangDriverOptions
131   )
133 target_link_libraries(clangBasic
134   PRIVATE
135   ${LLVM_ATOMIC_LIB}