1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[CMake] Cleanup ExternalProject usage of CMake 3.x features

All the ExternalProject features in use here are supported by CMake 3.4.3, so we don't need these version checks anymore.

llvm-svn: 272327
This commit is contained in:
Chris Bieneman 2016-06-09 22:41:36 +00:00
parent 57cf853e91
commit 0158e53ab5

View File

@ -61,20 +61,6 @@ function(llvm_ExternalProject_Add name source_dir)
list(APPEND TOOLCHAIN_BINS ${RUNTIME_LIBRARIES})
endif()
if(CMAKE_VERSION VERSION_GREATER 3.1.0)
set(cmake_3_1_EXCLUDE_FROM_ALL EXCLUDE_FROM_ALL 1)
set(cmake_3_1_BUILD_ALWAYS BUILD_ALWAYS 1)
endif()
if(CMAKE_VERSION VERSION_GREATER 3.3.20150708)
set(cmake_3_4_USES_TERMINAL_OPTIONS
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
)
set(cmake_3_4_USES_TERMINAL USES_TERMINAL 1)
endif()
set(STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}-stamps/)
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}-bins/)
@ -117,7 +103,7 @@ function(llvm_ExternalProject_Add name source_dir)
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp)
if(ARG_EXCLUDE_FROM_ALL)
set(exclude ${cmake_3_1_EXCLUDE_FROM_ALL})
set(exclude EXCLUDE_FROM_ALL 1)
endif()
ExternalProject_Add(${name}
@ -135,8 +121,10 @@ function(llvm_ExternalProject_Add name source_dir)
${PASSTHROUGH_VARIABLES}
INSTALL_COMMAND ""
STEP_TARGETS configure build
${cmake_3_1_BUILD_ALWAYS}
${cmake_3_4_USES_TERMINAL_OPTIONS}
BUILD_ALWAYS 1
USES_TERMINAL_CONFIGURE 1
USES_TERMINAL_BUILD 1
USES_TERMINAL_INSTALL 1
)
if(CMAKE_VERSION VERSION_LESS 3.1.0)
@ -150,7 +138,7 @@ function(llvm_ExternalProject_Add name source_dir)
COMMENT "Forcing rebuild of ${name}"
DEPENDEES configure clean
DEPENDS ${ALWAYS_REBUILD} ${ARG_DEPENDS} ${TOOLCHAIN_BINS}
${cmake_3_4_USES_TERMINAL} )
USES_TERMINAL 1 )
endif()
if(ARG_USE_TOOLCHAIN)
@ -164,7 +152,7 @@ function(llvm_ExternalProject_Add name source_dir)
DEPENDEES configure
${force_deps}
WORKING_DIRECTORY ${BINARY_DIR}
${cmake_3_4_USES_TERMINAL}
USES_TERMINAL 1
)
ExternalProject_Add_StepTargets(${name} clean)