Skip to content

Commit

Permalink
[CMake] Cleanup uses of USES_TERMINAL
Browse files Browse the repository at this point in the history
Now that we are on CMake 3.4.3 we no longer need a version check around this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272211 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Chris Bieneman committed Jun 8, 2016
1 parent dd92905 commit 0fd0a99
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
6 changes: 0 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ if (POLICY CMP0051)
cmake_policy(SET CMP0051 OLD)
endif()

if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
set(cmake_3_2_USES_TERMINAL)
else()
set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
endif()

if(NOT DEFINED LLVM_VERSION_MAJOR)
set(LLVM_VERSION_MAJOR 3)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ function(add_lit_target target comment)
add_custom_target(${target}
COMMAND ${LIT_COMMAND} ${ARG_UNPARSED_ARGUMENTS}
COMMENT "${comment}"
${cmake_3_2_USES_TERMINAL}
USES_TERMINAL
)
else()
add_custom_target(${target}
Expand Down
10 changes: 3 additions & 7 deletions cmake/modules/LLVMExternalProjectUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,14 @@ function(llvm_ExternalProject_Add name source_dir)
set(cmake_3_4_USES_TERMINAL USES_TERMINAL 1)
endif()

if(CMAKE_VERSION VERSION_GREATER 3.1.20141116)
set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
endif()

set(STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}-stamps/)
set(BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${name}-bins/)

add_custom_target(${name}-clear
COMMAND ${CMAKE_COMMAND} -E remove_directory ${BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${STAMP_DIR}
COMMENT "Clobbering ${name} build and stamp directories"
${cmake_3_2_USES_TERMINAL}
USES_TERMINAL
)

# Find all variables that start with COMPILER_RT and populate a variable with
Expand Down Expand Up @@ -187,7 +183,7 @@ function(llvm_ExternalProject_Add name source_dir)
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_COMPONENT=${name}
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
${cmake_3_2_USES_TERMINAL})
USES_TERMINAL)
endif()

# Add top-level targets
Expand All @@ -198,6 +194,6 @@ function(llvm_ExternalProject_Add name source_dir)
DEPENDS ${name}-configure
WORKING_DIRECTORY ${BINARY_DIR}
VERBATIM
${cmake_3_2_USES_TERMINAL})
USES_TERMINAL)
endforeach()
endfunction()
4 changes: 2 additions & 2 deletions tools/xcode-toolchain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ add_custom_target(install-xcode-toolchain
COMMAND "${CMAKE_COMMAND}"
-DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
${cmake_3_2_USES_TERMINAL})
USES_TERMINAL)

if(LLVM_DISTRIBUTION_COMPONENTS)
if(CMAKE_CONFIGURATION_TYPES)
Expand All @@ -86,7 +86,7 @@ if(LLVM_DISTRIBUTION_COMPONENTS)
-DCMAKE_INSTALL_COMPONENT=${target}
-DCMAKE_INSTALL_PREFIX=${LLVMToolchainDir}/usr/
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
${cmake_3_2_USES_TERMINAL})
USES_TERMINAL)
add_dependencies(install-distribution-toolchain install-distribution-${target})
endforeach()
endif()

0 comments on commit 0fd0a99

Please sign in to comment.