This is an automated email from the ASF dual-hosted git repository. astitcher pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit b04f3228fe17baf6aa42fc2646ea69dbb6a11481 Author: Andrew Stitcher <astitc...@apache.org> AuthorDate: Thu Jan 5 20:46:49 2023 -0500 PROTON-2669: Remove cmake workarounds that aren't needed anymore The new minimum cmake is 3.16 which renders all thse workarounds moot. --- c/CMakeLists.txt | 2 -- tools/cmake/Modules/FindOpenSSL.cmake | 35 --------------------- tools/cmake/Modules/FindPython.cmake | 57 ----------------------------------- tools/cmake/Modules/FindSWIG.cmake | 46 ---------------------------- tools/cmake/Modules/FindThreads.cmake | 42 -------------------------- 5 files changed, 182 deletions(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index 27b40e77a..1d9d180a1 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -729,8 +729,6 @@ install (FILES DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton) install (FILES ../tools/cmake/Modules/FindCyrusSASL.cmake - ../tools/cmake/Modules/FindOpenSSL.cmake - ../tools/cmake/Modules/FindThreads.cmake DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton) if (ENABLE_BENCHMARKS) diff --git a/tools/cmake/Modules/FindOpenSSL.cmake b/tools/cmake/Modules/FindOpenSSL.cmake deleted file mode 100644 index 06d5ce4c2..000000000 --- a/tools/cmake/Modules/FindOpenSSL.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This is a wrapper hack purely so that we can use imported targets -# with cmake 2.8.12 and its supplied older modules - -include(${CMAKE_ROOT}/Modules/FindOpenSSL.cmake) - -if (OPENSSL_FOUND AND NOT TARGET OpenSSL::SSL) - add_library(OpenSSL::SSL UNKNOWN IMPORTED) - set_target_properties(OpenSSL::SSL - PROPERTIES - IMPORTED_LOCATION "${OPENSSL_SSL_LIBRARY}" - INTERFACE_LINK_LIBRARIES "${OPENSSL_CRYPTO_LIBRARY}" - INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}" - ) -endif () - - diff --git a/tools/cmake/Modules/FindPython.cmake b/tools/cmake/Modules/FindPython.cmake deleted file mode 100644 index 9a79e79bf..000000000 --- a/tools/cmake/Modules/FindPython.cmake +++ /dev/null @@ -1,57 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This is a wrapper hack purely so that we can use FindPython -# with cmake 2.8.12 and its supplied older modules - -if (POLICY CMP0094) # https://cmake.org/cmake/help/latest/policy/CMP0094.html - cmake_policy(SET CMP0094 NEW) # FindPython should return the first matching Python on PATH -endif () - -if (DEFINED PYTHON_EXECUTABLE AND DEFINED Python_EXECUTABLE) - message(FATAL_ERROR "Both PYTHON_EXECUTABLE and Python_EXECUTABLE are defined. Define at most one of those.") -endif () - -# FindPython was added in CMake 3.12, but there it always returned -# newest Python on the entire PATH. We want to use the first one. -if (CMAKE_VERSION VERSION_LESS "3.15.0") - if (DEFINED Python_EXECUTABLE) - set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) - endif () - - find_package (PythonInterp ${Python_FIND_VERSION} REQUIRED) - # forward compatibility with FindPython - set(Python_VERSION_STRING "${PYTHON_VERSION_STRING}") - set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}") - # for completeness, these are not actually used now - set(Python_VERSION_MAJOR "${PYTHON_VERSION_MAJOR}") - set(Python_VERSION_MINOR "${PYTHON_VERSION_MINOR}") - set(Python_VERSION_PATCH "${PYTHON_VERSION_PATCH}") - - find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) - set(Python_Development_FOUND "${PYTHONLIBS_FOUND}") - set(Python_INCLUDE_DIRS "${PYTHON_INCLUDE_PATH}") - set(Python_LIBRARIES "${PYTHON_LIBRARIES}") -else () - if (DEFINED PYTHON_EXECUTABLE) - set(Python_EXECUTABLE ${PYTHON_EXECUTABLE}) - endif () - - include(${CMAKE_ROOT}/Modules/FindPython.cmake) -endif () diff --git a/tools/cmake/Modules/FindSWIG.cmake b/tools/cmake/Modules/FindSWIG.cmake deleted file mode 100644 index 26fcf0fce..000000000 --- a/tools/cmake/Modules/FindSWIG.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -include(${CMAKE_ROOT}/Modules/FindSWIG.cmake) - -if (NOT COMMAND swig_add_library) - macro (SWIG_ADD_LIBRARY name) - set(options "") - set(oneValueArgs LANGUAGE TYPE) - set(multiValueArgs SOURCES) - cmake_parse_arguments(_SAM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if (NOT DEFINED _SAM_LANGUAGE) - message(FATAL_ERROR "SWIG_ADD_LIBRARY: Missing LANGUAGE argument") - endif () - - if (NOT DEFINED _SAM_SOURCES) - message(FATAL_ERROR "SWIG_ADD_LIBRARY: Missing SOURCES argument") - endif () - - if (DEFINED _SAM_TYPE AND NOT _SAM_LANGUAGE STREQUAL "module") - message(FATAL_ERROR "SWIG_ADD_LIBRARY: This fallback impl of swig_add_library supports the module type only") - endif () - - swig_add_module(${name} ${_SAM_LANGUAGE} ${_SAM_SOURCES}) - endmacro () -endif (NOT COMMAND swig_add_library) - -# Builtin FindSWIG.cmake "forgets" to make its outputs advanced like a good citizen -mark_as_advanced (SWIG_DIR SWIG_EXECUTABLE SWIG_VERSION) diff --git a/tools/cmake/Modules/FindThreads.cmake b/tools/cmake/Modules/FindThreads.cmake deleted file mode 100644 index d399fa0ba..000000000 --- a/tools/cmake/Modules/FindThreads.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# This is a wrapper hack purely so that we can use imported targets -# with cmake 2.8.12 and its supplied older modules - -include(${CMAKE_ROOT}/Modules/FindThreads.cmake) - -if(Threads_FOUND AND NOT TARGET Threads::Threads) - add_library(Threads::Threads UNKNOWN IMPORTED) - - if(THREADS_HAVE_PTHREAD_ARG) - set_target_properties(Threads::Threads - PROPERTIES - INTERFACE_COMPILE_OPTIONS "-pthread" - ) - endif() - - if(CMAKE_THREAD_LIBS_INIT) - set_target_properties(Threads::Threads - PROPERTIES - IMPORTED_LOCATION "${CMAKE_THREAD_LIBS_INIT}" - ) - endif() -endif() - --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org