1set(LLVM_LINK_COMPONENTS 2 MC 3 Support 4 ) 5 6add_clang_library(clangBasic 7 Attributes.cpp 8 Builtins.cpp 9 CharInfo.cpp 10 Diagnostic.cpp 11 DiagnosticIDs.cpp 12 FileManager.cpp 13 FileSystemStatCache.cpp 14 IdentifierTable.cpp 15 LangOptions.cpp 16 Module.cpp 17 ObjCRuntime.cpp 18 OpenMPKinds.cpp 19 OperatorPrecedence.cpp 20 SourceLocation.cpp 21 SourceManager.cpp 22 TargetInfo.cpp 23 Targets.cpp 24 TokenKinds.cpp 25 Version.cpp 26 VersionTuple.cpp 27 VirtualFileSystem.cpp 28 Warnings.cpp 29 ) 30 31# Determine Subversion revision. 32# FIXME: This only gets updated when CMake is run, so this revision number 33# may be out-of-date! 34if( NOT IS_SYMLINK "${CLANG_SOURCE_DIR}" ) # See PR 8437 35 find_package(Subversion) 36endif() 37if (Subversion_FOUND AND EXISTS "${CLANG_SOURCE_DIR}/.svn") 38 set(FIRST_SOURCE_DIR ${LLVM_MAIN_SRC_DIR}) 39 set(FIRST_REPOSITORY LLVM_REPOSITORY) 40 set(SECOND_SOURCE_DIR ${CLANG_SOURCE_DIR}) 41 set(SECOND_REPOSITORY SVN_REPOSITORY) 42 set(HEADER_FILE ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc) 43 include(GetSVN) 44 45 # Mark the generated header as being generated. 46 message(STATUS "Expecting header to go in ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc") 47 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc 48 PROPERTIES GENERATED TRUE 49 HEADER_FILE_ONLY TRUE) 50 51 # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC. 52 set_source_files_properties(Version.cpp 53 PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC") 54 55endif() 56