You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/11/15 21:05:31 UTC

[07/31] qpid-proton git commit: PROTON-1633: Much neater way to allow the examples to work with the sanitizers

PROTON-1633: Much neater way to allow the examples to work with the sanitizers


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/79cc60fc
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/79cc60fc
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/79cc60fc

Branch: refs/heads/go1
Commit: 79cc60fcfecb5ba73956465c379415c125bcbce9
Parents: affa7cb
Author: Andrew Stitcher <as...@apache.org>
Authored: Thu Oct 19 18:57:20 2017 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Fri Oct 20 15:21:44 2017 -0400

----------------------------------------------------------------------
 examples/ProtonConfig.cmake    |  9 ++++++---
 examples/ProtonCppConfig.cmake |  3 ++-
 examples/c/CMakeLists.txt      | 10 ++++------
 examples/cpp/CMakeLists.txt    |  4 +---
 4 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/79cc60fc/examples/ProtonConfig.cmake
----------------------------------------------------------------------
diff --git a/examples/ProtonConfig.cmake b/examples/ProtonConfig.cmake
index e0a2ff8..29c1fb5 100644
--- a/examples/ProtonConfig.cmake
+++ b/examples/ProtonConfig.cmake
@@ -30,16 +30,19 @@
 set (Proton_VERSION       ${PN_VERSION})
 
 set (Proton_INCLUDE_DIRS  ${CMAKE_SOURCE_DIR}/proton-c/include)
-set (Proton_LIBRARIES     qpid-proton)
+set (Proton_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton)
+set (Proton_DEFINITIONS   ${C_EXAMPLE_FLAGS})
 set (Proton_FOUND True)
 
 set (Proton_Core_INCLUDE_DIRS  ${CMAKE_SOURCE_DIR}/proton-c/include)
-set (Proton_Core_LIBRARIES qpid-proton-core)
+set (Proton_Core_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton-core)
+set (Proton_Core_DEFINITIONS   ${C_EXAMPLE_FLAGS})
 set (Proton_Core_FOUND True)
 
 if (${HAS_PROACTOR})
   set (Proton_Proactor_INCLUDE_DIRS  ${CMAKE_SOURCE_DIR}/proton-c/include)
-  set (Proton_Proactor_LIBRARIES qpid-proton-proactor)
+  set (Proton_Proactor_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton-proactor)
+  set (Proton_Proactor_DEFINITIONS   ${C_EXAMPLE_FLAGS})
   set (Proton_Proactor_FOUND True)
 endif()
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/79cc60fc/examples/ProtonCppConfig.cmake
----------------------------------------------------------------------
diff --git a/examples/ProtonCppConfig.cmake b/examples/ProtonCppConfig.cmake
index e23d134..9709163 100644
--- a/examples/ProtonCppConfig.cmake
+++ b/examples/ProtonCppConfig.cmake
@@ -29,5 +29,6 @@
 
 set (ProtonCpp_VERSION       ${PN_VERSION})
 set (ProtonCpp_INCLUDE_DIRS  ${CMAKE_SOURCE_DIR}/proton-c/include ${CMAKE_SOURCE_DIR}/proton-c/bindings/cpp/include)
-set (ProtonCpp_LIBRARIES     qpid-proton-cpp)
+set (ProtonCpp_LIBRARIES     ${C_EXAMPLE_LINK_FLAGS} qpid-proton-cpp)
+set (ProtonCpp_DEFINITIONS   ${CXX_EXAMPLE_FLAGS})
 set (ProtonCpp_FOUND True)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/79cc60fc/examples/c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt
index dd1feb4..d2d0fcf 100644
--- a/examples/c/CMakeLists.txt
+++ b/examples/c/CMakeLists.txt
@@ -21,11 +21,10 @@ find_package(Proton REQUIRED Core Proactor)
 set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
 find_package(Threads REQUIRED)
 
-include(CheckCCompilerFlag)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${Proton_INCLUDE_DIRS})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR})
 
-add_definitions(${C_EXAMPLE_FLAGS})
+include_directories(${Proton_INCLUDE_DIRS})
+add_definitions(${Proton_DEFINITIONS})
 
 # Add a test with the correct environment to find test executables and valgrind.
 if(WIN32)
@@ -38,8 +37,7 @@ foreach (name broker send receive direct send-abort send-ssl)
   add_executable(c-${name} ${name}.c)
   target_link_libraries(c-${name} ${Proton_Proactor_LIBRARIES} ${Proton_Core_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
   set_target_properties(c-${name} PROPERTIES
-    OUTPUT_NAME ${name}
-    LINK_FLAGS "${C_EXAMPLE_LINK_FLAGS}")
+    OUTPUT_NAME ${name})
 endforeach()
 
 set(run_env ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/proton-c/env.py ${EXAMPLE_ENV} "PATH=${test_path}" ${VALGRIND_ENV})

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/79cc60fc/examples/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt
index 037285d..cf6b958 100644
--- a/examples/cpp/CMakeLists.txt
+++ b/examples/cpp/CMakeLists.txt
@@ -22,7 +22,7 @@ find_package(ProtonCpp REQUIRED)
 
 include_directories(${ProtonCpp_INCLUDE_DIRS})
 link_libraries(${ProtonCpp_LIBRARIES})
-add_definitions(${CXX_EXAMPLE_FLAGS})
+add_definitions(${ProtonCpp_DEFINITIONS})
 
 set (BUILD_CPP_03 OFF CACHE BOOL "Compile as C++03 even when C++11 is available")
 # This effectively checks for cmake version 3.1 or later
@@ -71,7 +71,6 @@ foreach(example
     ssl_client_cert
     encode_decode)
   add_executable(${example} ${example}.cpp)
-  set_target_properties(${example} PROPERTIES LINK_FLAGS "${CXX_EXAMPLE_LINK_FLAGS}")
 endforeach()
 
 if(HAS_CPP11)
@@ -83,7 +82,6 @@ if(HAS_CPP11)
       multithreaded_client_flow_control
       )
     add_executable(${example} ${example}.cpp)
-    set_target_properties(${example} PROPERTIES LINK_FLAGS "${CXX_EXAMPLE_LINK_FLAGS}")
   endforeach()
 endif()
 


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