From 7046165670135d9b5ba4d72eae5b934ec50fde2a Mon Sep 17 00:00:00 2001 From: T8T9 <62922815+T8T9@users.noreply.github.com> Date: Fri, 19 Jun 2020 23:20:56 +0800 Subject: [PATCH] remove ${CMAKE_VERSION} VERSION_LESS "3.3.0". (#25128) --- cmake/external/boost.cmake | 8 +------- cmake/external/cub.cmake | 8 +------- cmake/external/dlpack.cmake | 8 +------- cmake/external/eigen.cmake | 8 +------- cmake/external/libmct.cmake | 8 +------- cmake/external/pybind11.cmake | 8 +------- cmake/external/rocprim.cmake | 8 +------- cmake/external/threadpool.cmake | 8 +------- cmake/external/xbyak.cmake | 8 +------- 9 files changed, 9 insertions(+), 63 deletions(-) diff --git a/cmake/external/boost.cmake b/cmake/external/boost.cmake index c95f7689058..e72008354a2 100644 --- a/cmake/external/boost.cmake +++ b/cmake/external/boost.cmake @@ -52,13 +52,7 @@ ExternalProject_Add( UPDATE_COMMAND "" ) -if (${CMAKE_VERSION} VERSION_LESS "3.3.0" OR NOT WIN32) - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/boost_dummy.c) - file(WRITE ${dummyfile} "const char *dummy = \"${dummyfile}\";") - add_library(boost STATIC ${dummyfile}) -else() - add_library(boost INTERFACE) -endif() +add_library(boost INTERFACE) add_dependencies(boost ${BOOST_PROJECT}) set(Boost_INCLUDE_DIR ${BOOST_INCLUDE_DIR}) diff --git a/cmake/external/cub.cmake b/cmake/external/cub.cmake index 9a7604af339..4a343b2c6af 100644 --- a/cmake/external/cub.cmake +++ b/cmake/external/cub.cmake @@ -41,12 +41,6 @@ ExternalProject_Add( TEST_COMMAND "" ) -if(${CMAKE_VERSION} VERSION_LESS "3.3.0") - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/cub_dummy.c) - file(WRITE ${dummyfile} "const char *dummy = \"${dummyfile}\";") - add_library(cub STATIC ${dummyfile}) -else() - add_library(cub INTERFACE) -endif() +add_library(cub INTERFACE) add_dependencies(cub extern_cub) diff --git a/cmake/external/dlpack.cmake b/cmake/external/dlpack.cmake index 831f1d5a682..a5144f8e463 100644 --- a/cmake/external/dlpack.cmake +++ b/cmake/external/dlpack.cmake @@ -42,12 +42,6 @@ ExternalProject_Add( TEST_COMMAND "" ) -if(${CMAKE_VERSION} VERSION_LESS "3.3.0") - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/dlpack_dummy.c) - file(WRITE ${dummyfile} "const char *dummy = \"${dummyfile}\";") - add_library(dlpack STATIC ${dummyfile}) -else() - add_library(dlpack INTERFACE) -endif() +add_library(dlpack INTERFACE) add_dependencies(dlpack extern_dlpack) diff --git a/cmake/external/eigen.cmake b/cmake/external/eigen.cmake index d7f89e4c901..30e74a3c241 100644 --- a/cmake/external/eigen.cmake +++ b/cmake/external/eigen.cmake @@ -89,12 +89,6 @@ else() ) endif() -if (${CMAKE_VERSION} VERSION_LESS "3.3.0") - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/eigen3_dummy.c) - file(WRITE ${dummyfile} "const char *dummy_eigen3 = \"${dummyfile}\";") - add_library(eigen3 STATIC ${dummyfile}) -else() - add_library(eigen3 INTERFACE) -endif() +add_library(eigen3 INTERFACE) add_dependencies(eigen3 extern_eigen3) diff --git a/cmake/external/libmct.cmake b/cmake/external/libmct.cmake index e81810e6c49..c10a662485c 100644 --- a/cmake/external/libmct.cmake +++ b/cmake/external/libmct.cmake @@ -52,12 +52,6 @@ ExternalProject_Add( CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${LIBMCT_INSTALL_ROOT} ) -if (${CMAKE_VERSION} VERSION_LESS "3.3.0" OR NOT WIN32) - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/boost_dummy.c) - file(WRITE ${dummyfile} "const char *dummy = \"${dummyfile}\";") - add_library(libmct STATIC ${dummyfile}) -else() - add_library(libmct INTERFACE) -endif() +add_library(libmct INTERFACE) ADD_DEPENDENCIES(libmct ${LIBMCT_PROJECT}) diff --git a/cmake/external/pybind11.cmake b/cmake/external/pybind11.cmake index 72a4bf65244..1297d613839 100644 --- a/cmake/external/pybind11.cmake +++ b/cmake/external/pybind11.cmake @@ -41,12 +41,6 @@ ExternalProject_Add( TEST_COMMAND "" ) -if(${CMAKE_VERSION} VERSION_LESS "3.3.0") - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/pybind_dummy.c) - file(WRITE ${dummyfile} "const char * dummy_pybind = \"${dummyfile}\";") - add_library(pybind STATIC ${dummyfile}) -else() - add_library(pybind INTERFACE) -endif() +add_library(pybind INTERFACE) add_dependencies(pybind extern_pybind) diff --git a/cmake/external/rocprim.cmake b/cmake/external/rocprim.cmake index df4c88cadc4..7cb76503971 100644 --- a/cmake/external/rocprim.cmake +++ b/cmake/external/rocprim.cmake @@ -44,12 +44,6 @@ ExternalProject_Add( INCLUDE_DIRECTORIES(${ROCPRIM_INCLUDE_DIR}) -if (${CMAKE_VERSION} VERSION_LESS "3.3.0") - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/rocprim_dummy.c) - file(WRITE ${dummyfile} "const char *dummy_rocprim = \"${dummyfile}\";") - add_library(rocprim STATIC ${dummyfile}) -else() - add_library(rocprim INTERFACE) -endif() +add_library(rocprim INTERFACE) add_dependencies(rocprim extern_rocprim) diff --git a/cmake/external/threadpool.cmake b/cmake/external/threadpool.cmake index 20d605183a5..24827b5bdf9 100644 --- a/cmake/external/threadpool.cmake +++ b/cmake/external/threadpool.cmake @@ -41,12 +41,6 @@ ExternalProject_Add( TEST_COMMAND "" ) -if (${CMAKE_VERSION} VERSION_LESS "3.3.0") - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/threadpool_dummy.c) - file(WRITE ${dummyfile} "const char *dummy_threadpool = \"${dummyfile}\";") - add_library(simple_threadpool STATIC ${dummyfile}) -else() - add_library(simple_threadpool INTERFACE) -endif() +add_library(simple_threadpool INTERFACE) add_dependencies(simple_threadpool extern_threadpool) diff --git a/cmake/external/xbyak.cmake b/cmake/external/xbyak.cmake index 1314f6fb5e6..f990914ab73 100644 --- a/cmake/external/xbyak.cmake +++ b/cmake/external/xbyak.cmake @@ -49,12 +49,6 @@ ExternalProject_Add( CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${XBYAK_INSTALL_ROOT} ) -if (${CMAKE_VERSION} VERSION_LESS "3.3.0") - set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/xbyak_dummy.c) - file(WRITE ${dummyfile} "const char *dummy_xbyak = \"${dummyfile}\";") - add_library(xbyak STATIC ${dummyfile}) -else() - add_library(xbyak INTERFACE) -endif() +add_library(xbyak INTERFACE) add_dependencies(xbyak ${XBYAK_PROJECT}) -- GitLab