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 ...@@ -321,8 +321,6 @@ set(LIBCLANG_LIBRARY_VERSION
"Version number that will be placed into the libclang library , in the form XX.YY") "Version number that will be placed into the libclang library , in the form XX.YY")
mark_as_advanced(CLANG_EXECUTABLE_VERSION LIBCLANG_LIBRARY_VERSION) 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(utils/TableGen)
add_subdirectory(include) add_subdirectory(include)
......
...@@ -20,26 +20,35 @@ add_clang_library(clangBasic ...@@ -20,26 +20,35 @@ add_clang_library(clangBasic
TokenKinds.cpp TokenKinds.cpp
Version.cpp Version.cpp
VersionTuple.cpp VersionTuple.cpp
${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc
) )
# Create custom target to generate the Subversion version include. # Determine Subversion revision.
add_custom_target(clang_revision_tag # FIXME: This only gets updated when CMake is run, so this revision number
${CMAKE_COMMAND} -DFIRST_SOURCE_DIR=${LLVM_MAIN_SRC_DIR} # may be out-of-date!
-DFIRST_NAME=LLVM if( NOT IS_SYMLINK "${CLANG_SOURCE_DIR}" ) # See PR 8437
-DSECOND_SOURCE_DIR=${CLANG_SOURCE_DIR} find_package(Subversion)
-DSECOND_NAME=SVN endif()
-DHEADER_FILE=${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc if (Subversion_FOUND AND EXISTS "${CLANG_SOURCE_DIR}/.svn")
-P ${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake) # 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. # Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC.
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc set_source_files_properties(Version.cpp
PROPERTIES GENERATED TRUE PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
HEADER_FILE_ONLY TRUE)
# Tell Version.cpp that it needs to build with -DHAVE_SVN_VERSION_INC. endif()
set_source_files_properties(Version.cpp
PROPERTIES COMPILE_DEFINITIONS "HAVE_SVN_VERSION_INC")
add_dependencies(clangBasic add_dependencies(clangBasic
ClangARMNeon ClangARMNeon
...@@ -56,14 +65,9 @@ add_dependencies(clangBasic ...@@ -56,14 +65,9 @@ add_dependencies(clangBasic
ClangDiagnosticParse ClangDiagnosticParse
ClangDiagnosticSema ClangDiagnosticSema
ClangDiagnosticSerialization ClangDiagnosticSerialization
clang_revision_tag )
)
# Force regeneration now.
FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc)
if(CLANG_ALWAYS_CHECK_VC_REV) # clangBasic depends on the version.
add_custom_command(TARGET clangBasic POST_BUILD if (Subversion_FOUND AND EXISTS "${CLANG_SOURCE_DIR}/.svn")
COMMAND ${CMAKE_COMMAND} -E remove add_dependencies(clangBasic clang_revision_tag)
${CMAKE_CURRENT_BINARY_DIR}/SVNVersion.inc) endif()
endif() \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment