mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +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:
parent
57cf853e91
commit
0158e53ab5
@ -61,20 +61,6 @@ function(llvm_ExternalProject_Add name source_dir)
|
|||||||
list(APPEND TOOLCHAIN_BINS ${RUNTIME_LIBRARIES})
|
list(APPEND TOOLCHAIN_BINS ${RUNTIME_LIBRARIES})
|
||||||
endif()
|
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(STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}-stamps/)
|
||||||
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}-bins/)
|
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)
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${name}-clobber-stamp)
|
||||||
|
|
||||||
if(ARG_EXCLUDE_FROM_ALL)
|
if(ARG_EXCLUDE_FROM_ALL)
|
||||||
set(exclude ${cmake_3_1_EXCLUDE_FROM_ALL})
|
set(exclude EXCLUDE_FROM_ALL 1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ExternalProject_Add(${name}
|
ExternalProject_Add(${name}
|
||||||
@ -135,8 +121,10 @@ function(llvm_ExternalProject_Add name source_dir)
|
|||||||
${PASSTHROUGH_VARIABLES}
|
${PASSTHROUGH_VARIABLES}
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
STEP_TARGETS configure build
|
STEP_TARGETS configure build
|
||||||
${cmake_3_1_BUILD_ALWAYS}
|
BUILD_ALWAYS 1
|
||||||
${cmake_3_4_USES_TERMINAL_OPTIONS}
|
USES_TERMINAL_CONFIGURE 1
|
||||||
|
USES_TERMINAL_BUILD 1
|
||||||
|
USES_TERMINAL_INSTALL 1
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.1.0)
|
if(CMAKE_VERSION VERSION_LESS 3.1.0)
|
||||||
@ -150,7 +138,7 @@ function(llvm_ExternalProject_Add name source_dir)
|
|||||||
COMMENT "Forcing rebuild of ${name}"
|
COMMENT "Forcing rebuild of ${name}"
|
||||||
DEPENDEES configure clean
|
DEPENDEES configure clean
|
||||||
DEPENDS ${ALWAYS_REBUILD} ${ARG_DEPENDS} ${TOOLCHAIN_BINS}
|
DEPENDS ${ALWAYS_REBUILD} ${ARG_DEPENDS} ${TOOLCHAIN_BINS}
|
||||||
${cmake_3_4_USES_TERMINAL} )
|
USES_TERMINAL 1 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ARG_USE_TOOLCHAIN)
|
if(ARG_USE_TOOLCHAIN)
|
||||||
@ -164,7 +152,7 @@ function(llvm_ExternalProject_Add name source_dir)
|
|||||||
DEPENDEES configure
|
DEPENDEES configure
|
||||||
${force_deps}
|
${force_deps}
|
||||||
WORKING_DIRECTORY ${BINARY_DIR}
|
WORKING_DIRECTORY ${BINARY_DIR}
|
||||||
${cmake_3_4_USES_TERMINAL}
|
USES_TERMINAL 1
|
||||||
)
|
)
|
||||||
ExternalProject_Add_StepTargets(${name} clean)
|
ExternalProject_Add_StepTargets(${name} clean)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user