1 set(LLVM_LINK_COMPONENTS
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})
16 if(clang_vc AND LLVM_APPEND_VC_REV)
17 set(clang_source_dir ${CLANG_SOURCE_DIR})
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)
35 set_source_files_properties(Version.cpp
36 PROPERTIES COMPILE_DEFINITIONS "CLANG_VENDOR=\"${CLANG_VENDOR} \"")
39 add_clang_library(clangBasic
53 FileSystemStatCache.cpp
62 OperatorPrecedence.cpp
65 SanitizerSpecialCaseList.cpp
99 Targets/WebAssembly.cpp