You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2023/01/13 00:00:33 UTC

[qpid-proton] branch main updated (51583a516 -> af957beac)

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


    from 51583a516 PROTON-2657: [cpp] Accessors for user data on endpoints and deliveries
     new 767372b2c PROTON-2669: Update examples CMakefiles for cmake 3.16
     new af957beac PROTON-2669: Remove another set of cmake workarounds no longer needed

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 c/CMakeLists.txt            | 36 ++++++------------------------------
 c/examples/CMakeLists.txt   | 20 +-------------------
 cpp/examples/CMakeLists.txt | 32 +++-----------------------------
 tests/share/CMakeLists.txt  |  2 +-
 4 files changed, 11 insertions(+), 79 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-proton] 01/02: PROTON-2669: Update examples CMakefiles for cmake 3.16

Posted by as...@apache.org.
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 767372b2c686d367d24d425e4d792f8dfadb8938
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Thu Jan 12 18:55:16 2023 -0500

    PROTON-2669: Update examples CMakefiles for cmake 3.16
---
 c/examples/CMakeLists.txt   | 20 +-------------------
 cpp/examples/CMakeLists.txt | 32 +++-----------------------------
 tests/share/CMakeLists.txt  |  2 +-
 3 files changed, 5 insertions(+), 49 deletions(-)

diff --git a/c/examples/CMakeLists.txt b/c/examples/CMakeLists.txt
index 04758e2f7..c0a984c09 100644
--- a/c/examples/CMakeLists.txt
+++ b/c/examples/CMakeLists.txt
@@ -16,7 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.16)
 
 project(ProtonCExamples C)
 
@@ -24,24 +24,6 @@ find_package(Proton REQUIRED Core Proactor)
 set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
 find_package(Threads REQUIRED)
 
-# The following block is purely for CMake 2.8.12
-# Remove it when we no longer support CMake 2.8.12
-if(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()
-
 foreach (name broker send receive direct send-abort send-ssl raw_echo raw_connect)
   add_executable(c-${name} ${name}.c)
   target_link_libraries(c-${name} Proton::core Proton::proactor Threads::Threads)
diff --git a/cpp/examples/CMakeLists.txt b/cpp/examples/CMakeLists.txt
index ed0abf083..328e71ced 100644
--- a/cpp/examples/CMakeLists.txt
+++ b/cpp/examples/CMakeLists.txt
@@ -16,7 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-cmake_minimum_required (VERSION 2.8.12)
+cmake_minimum_required (VERSION 3.16)
 
 project(ProtonCppExamples C CXX)
 
@@ -24,34 +24,8 @@ find_package(ProtonCpp REQUIRED)
 set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
 find_package(Threads REQUIRED)
 
-# The following block is purely for CMake 2.8.12
-# Remove it when we no longer support CMake 2.8.12
-if(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()
-
-# This effectively checks for cmake version 3.1 or later
-if (DEFINED CMAKE_CXX_COMPILE_FEATURES)
-  set(CMAKE_CXX_STANDARD 11)
-  set(CMAKE_CXX_EXTENSIONS OFF)
-else ()
-  # This can only be a fairly old version of Linux in practice
-  set(CXX_STANDARD "-std=c++11")
-  add_definitions(${CXX_STANDARD})
-endif()
-
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_EXTENSIONS OFF)
 
 # Single-threaded examples
 foreach(example
diff --git a/tests/share/CMakeLists.txt b/tests/share/CMakeLists.txt
index 88884145a..68bffcc47 100644
--- a/tests/share/CMakeLists.txt
+++ b/tests/share/CMakeLists.txt
@@ -17,7 +17,7 @@
 # under the License.
 #
 
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.16)
 
 project(ProtonExamples)
 include(CTest)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-proton] 02/02: PROTON-2669: Remove another set of cmake workarounds no longer needed

Posted by as...@apache.org.
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 af957beac09c592ef4e62d7535142d263b32a6b5
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Thu Jan 12 18:56:04 2023 -0500

    PROTON-2669: Remove another set of cmake workarounds no longer needed
    
    The newer versions of cmake allow you to use OBJECT libraries as a
    target for target_link_libraries()
---
 c/CMakeLists.txt | 36 ++++++------------------------------
 1 file changed, 6 insertions(+), 30 deletions(-)

diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
index 1d9d180a1..e7c691008 100644
--- a/c/CMakeLists.txt
+++ b/c/CMakeLists.txt
@@ -433,13 +433,7 @@ set_target_properties(qpid-proton-core-objects PROPERTIES
   COMPILE_FLAGS "${LTO}"
   LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
 target_compile_definitions(qpid-proton-core-objects PRIVATE qpid_proton_core_EXPORTS)
-
-# Can't use target_link_libraries() because cmake 2.8.12 doesn't allow object libraries as the first param
-# otherwise for cmake 3.9 and on this would be:
-#   target_link_libraries (qpid-proton-core-objects ${SSL_LIB} ${SASL_LIB} ${PLATFORM_LIBS})
-target_compile_definitions(qpid-proton-core-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-core,COMPILE_DEFINITIONS>)
-target_compile_options    (qpid-proton-core-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-core,COMPILE_OPTIONS>)
-target_include_directories(qpid-proton-core-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-core,INCLUDE_DIRECTORIES>)
+target_link_libraries (qpid-proton-core-objects ${SSL_LIB} ${SASL_LIB} ${PLATFORM_LIBS})
 
 add_library (qpid-proton-platform-io-objects OBJECT ${qpid-proton-platform-io})
 set_target_properties(qpid-proton-platform-io-objects PROPERTIES
@@ -448,10 +442,7 @@ set_target_properties(qpid-proton-platform-io-objects PROPERTIES
   COMPILE_FLAGS "${LTO}"
   LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
 target_compile_definitions(qpid-proton-platform-io-objects PRIVATE qpid_proton_EXPORTS)
-
-target_compile_definitions(qpid-proton-platform-io-objects PRIVATE $<TARGET_PROPERTY:qpid-proton,COMPILE_DEFINITIONS>)
-target_compile_options    (qpid-proton-platform-io-objects PRIVATE $<TARGET_PROPERTY:qpid-proton,COMPILE_OPTIONS>)
-target_include_directories(qpid-proton-platform-io-objects PRIVATE $<TARGET_PROPERTY:qpid-proton,INCLUDE_DIRECTORIES>)
+target_link_libraries (qpid-proton-platform-io-objects ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS} ${PROACTOR_LIBS})
 
 add_library (qpid-proton-core SHARED $<TARGET_OBJECTS:qpid-proton-core-objects>)
 target_link_libraries (qpid-proton-core LINK_PRIVATE ${SSL_LIB} ${SASL_LIB} ${PLATFORM_LIBS})
@@ -483,14 +474,7 @@ if (qpid-proton-proactor)
     COMPILE_FLAGS "${LTO}"
     LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
   target_compile_definitions(qpid-proton-proactor-objects PRIVATE qpid_proton_proactor_EXPORTS)
-  set(TARGET_OBJECTS_qpid-proton-proactor-objects "$<TARGET_OBJECTS:qpid-proton-proactor-objects>")
-
-  # Can't use target_link_libraries() because cmake 2.8.12 doesn't allow object libraries as the first param
-  # otherwise for cmake 3.9 and on this would be:
-  #   target_link_libraries (qpid-proton-proactor-objects ${PLATFORM_LIBS} ${PROACTOR_LIBS})
-  target_compile_definitions(qpid-proton-proactor-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-proactor,COMPILE_DEFINITIONS>)
-  target_compile_options    (qpid-proton-proactor-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-proactor,COMPILE_OPTIONS>)
-  target_include_directories(qpid-proton-proactor-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-proactor,INCLUDE_DIRECTORIES>)
+  target_link_libraries (qpid-proton-proactor-objects ${PLATFORM_LIBS} ${PROACTOR_LIBS})
 
   add_library (qpid-proton-proactor SHARED $<TARGET_OBJECTS:qpid-proton-proactor-objects>)
   target_link_libraries (qpid-proton-proactor  LINK_PUBLIC qpid-proton-core)
@@ -510,7 +494,6 @@ if (qpid-proton-proactor)
     target_link_libraries (qpid-proton-proactor-static PRIVATE ${PLATFORM_LIBS} ${PROACTOR_LIBS})
     set_target_properties(qpid-proton-proactor-static PROPERTIES
       EXPORT_NAME proactor)
-    set(TARGET_qpid-proton-proactor-static qpid-proton-proactor-static)
   endif(BUILD_STATIC_LIBS)
 endif()
 
@@ -523,7 +506,7 @@ set(qpid-proton-noncore-src
 add_library (qpid-proton SHARED
   $<TARGET_OBJECTS:qpid-proton-core-objects>
   $<TARGET_OBJECTS:qpid-proton-platform-io-objects>
-  ${TARGET_OBJECTS_qpid-proton-proactor-objects}
+  $<TARGET_OBJECTS:qpid-proton-proactor-objects>
   ${qpid-proton-noncore-src})
 target_link_libraries (qpid-proton LINK_PRIVATE ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS} ${PROACTOR_LIBS})
 set_target_properties (qpid-proton
@@ -543,7 +526,7 @@ if (BUILD_STATIC_LIBS)
   target_compile_definitions(qpid-proton-static PUBLIC PROTON_DECLARE_STATIC)
   target_link_libraries (qpid-proton-static
     qpid-proton-core-static
-    ${TARGET_qpid-proton-proactor-static}
+    qpid-proton-proactor-static
     ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS} ${PROACTOR_LIBS})
   set_target_properties(qpid-proton-static PROPERTIES
     EXPORT_NAME qpid-proton)
@@ -563,14 +546,7 @@ if (qpid-proton-tls)
     COMPILE_FLAGS "${LTO}"
     LINK_FLAGS "${CATCH_UNDEFINED} ${LINK_LTO}")
   target_compile_definitions(qpid-proton-tls-objects PRIVATE qpid_proton_tls_EXPORTS)
-  set(TARGET_OBJECTS_qpid-proton-tls-objects "$<TARGET_OBJECTS:qpid-proton-tls-objects>")
-
-  # Can't use target_link_libraries() because cmake 2.8.12 doesn't allow object libraries as the first param
-  # otherwise for cmake 3.9 and on this would be:
-  #   target_link_libraries (qpid-proton-tls-objects ${SSL_LIB} ${PLATFORM_LIBS})
-  target_compile_definitions(qpid-proton-tls-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-tls,COMPILE_DEFINITIONS>)
-  target_compile_options    (qpid-proton-tls-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-tls,COMPILE_OPTIONS>)
-  target_include_directories(qpid-proton-tls-objects PRIVATE $<TARGET_PROPERTY:qpid-proton-tls,INCLUDE_DIRECTORIES>)
+  target_link_libraries (qpid-proton-tls-objects ${SSL_LIB} ${PLATFORM_LIBS})
 
   add_library (qpid-proton-tls SHARED $<TARGET_OBJECTS:qpid-proton-tls-objects>)
   target_link_libraries (qpid-proton-tls  LINK_PUBLIC qpid-proton-core)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org