workflows/release-tasks: Remove stray backslash
[llvm-project.git] / lld / Common / CMakeLists.txt
blob71df89c28aea0eab25f26b895f22c4de2dee1211
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})
9 endif()
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
24   Args.cpp
25   CommonLinkerContext.cpp
26   DWARF.cpp
27   ErrorHandler.cpp
28   Filesystem.cpp
29   Memory.cpp
30   Reproduce.cpp
31   Strings.cpp
32   TargetOptionsCommandFlags.cpp
33   Timer.cpp
34   VCSVersion.inc
35   Version.cpp
37   ADDITIONAL_HEADER_DIRS
38   ${LLD_INCLUDE_DIR}/lld/Common
40   LINK_COMPONENTS
41   Codegen
42   Core
43   DebugInfoDWARF
44   Demangle
45   MC
46   Option
47   Support
48   Target
49   TargetParser
51   LINK_LIBS
52   ${LLVM_PTHREAD_LIB}
53   ${LLVM_ATOMIC_LIB}
55   DEPENDS
56   intrinsics_gen
57   )