Skip to content
Snippets Groups Projects
Commit 31e7636a authored by Rafael Espindola's avatar Rafael Espindola
Browse files

Revert commits r190613, r190560 and r190557.

The added a cmake invocation to null builds, making them a lot slower.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191784 91177308-0d34-0410-b5e6-96231b3b80d8
parent 0cc83d15
No related branches found
No related tags found
No related merge requests found
......@@ -321,8 +321,6 @@ set(LIBCLANG_LIBRARY_VERSION
"Version number that will be placed into the libclang library , in the form XX.YY")
mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION)
option(CLANG_ALWAYS_CHECK_VC_REV "Always keep revision number up-to-date." OFF)
add_subdirectory(utils/TableGen)
add_subdirectory(include)
......
......@@ -20,26 +20,35 @@ add_clang_library(clangBasic
TokenKinds.cpp
Version.cpp
VersionTuple.cpp
${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc
)
# Create custom target to generate the Subversion version include.
add_custom_target(clang_revision_tag
${CMAKE_COMMAND} -DFIRST_SOURCE_DIR=${LLVM_MAIN_SRC_DIR}
-DFIRST_NAME=LLVM
-DSECOND_SOURCE_DIR=${CLANG_SOURCE_DIR}
-DSECOND_NAME=SVN
-DHEADER_FILE=${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc
-P ${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake)
# Determine Subversion revision.
# FIXME: This only gets updated when CMake is run, so this revision number
# may be out-of-date!
if( NOT IS_SYMLINK "${CLANG_SOURCE_DIR}" ) # See PR 8437
find_package(Subversion)
endif()
if (Subversion_FOUND AND EXISTS "${CLANG_SOURCE_DIR}/.svn")
# Create custom target to generate the Subversion version include.
add_custom_target(clang_revision_tag ALL
COMMAND ${CMAKE_COMMAND} -DFIRST_SOURCE_DIR=${LLVM_MAIN_SRC_DIR}
-DFIRST_REPOSITORY=LLVM_REPOSITORY
-DSECOND_SOURCE_DIR=${CLANG_SOURCE_DIR}
-DSECOND_REPOSITORY=SVN_REPOSITORY
-DHEADER_FILE=${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc
-P ${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake)
# Mark the generated header as being generated.
message(STATUS "Expecting header to go in ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc")
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc
PROPERTIES GENERATED TRUE
HEADER_FILE_ONLY TRUE)
# Mark the generated header as being generated.
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc
PROPERTIES GENERATED TRUE
HEADER_FILE_ONLY TRUE)
# Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
set_source_files_properties(Version.cpp
PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
# Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
set_source_files_properties(Version.cpp
PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
endif()
add_dependencies(clangBasic
ClangARMNeon
......@@ -56,14 +65,9 @@ add_dependencies(clangBasic
ClangDiagnosticParse
ClangDiagnosticSema
ClangDiagnosticSerialization
clang_revision_tag
)
# Force regeneration now.
FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc)
)
if(CLANG_ALWAYS_CHECK_VC_REV)
add_custom_command(TARGET clangBasic POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove
${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc)
endif()
# clangBasic depends on the version.
if (Subversion_FOUND AND EXISTS "${CLANG_SOURCE_DIR}/.svn")
add_dependencies(clangBasic clang_revision_tag)
endif()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment