1 find_first_existing_vc_file("${LLVM_MAIN_SRC_DIR}" llvm_vc)
2 find_first_existing_vc_file("${LLD_SOURCE_DIR}" lld_vc)
4 set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
5 set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
7 if(lld_vc AND LLVM_APPEND_VC_REV)
8 set(lld_source_dir ${LLD_SOURCE_DIR})
11 add_custom_command(OUTPUT "${version_inc}"
12 DEPENDS "${lld_vc}" "${generate_vcs_version_script}"
13 COMMAND ${CMAKE_COMMAND} "-DNAMES=LLD"
14 "-DLLD_SOURCE_DIR=${lld_source_dir}"
15 "-DHEADER_FILE=${version_inc}"
16 -P "${generate_vcs_version_script}")
18 # Mark the generated header as being generated.
19 set_source_files_properties("${version_inc}"
20 PROPERTIES GENERATED TRUE
21 HEADER_FILE_ONLY TRUE)
23 add_lld_library(lldCommon
25 CommonLinkerContext.cpp
32 TargetOptionsCommandFlags.cpp
37 ADDITIONAL_HEADER_DIRS
38 ${LLD_INCLUDE_DIR}/lld/Common