forked from hush/hush3
miodragpop
4 years ago
18 changed files with 457 additions and 316 deletions
@ -1,288 +1,314 @@ |
|||
From 03f5fc0826115edbfca468261b70c0daf627f488 Mon Sep 17 00:00:00 2001 |
|||
From: Simon <simon@bitcartel.com> |
|||
Date: Thu, 27 Apr 2017 17:15:59 -0700 |
|||
Subject: [PATCH] Enable C++11, build static library and cpp bindings with minimal dependencies. |
|||
|
|||
---
|
|||
CMakeLists.txt | 13 +++++++------ |
|||
examples/cpp/CMakeLists.txt | 1 + |
|||
proton-c/CMakeLists.txt | 32 +++++++++++++++---------------- |
|||
proton-c/bindings/CMakeLists.txt | 6 +++--- |
|||
proton-c/bindings/cpp/CMakeLists.txt | 24 +++++++++++------------ |
|||
proton-c/bindings/cpp/docs/CMakeLists.txt | 2 +- |
|||
proton-c/docs/api/CMakeLists.txt | 2 +- |
|||
7 files changed, 41 insertions(+), 39 deletions(-) |
|||
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|||
index b538ffd..4a5e787 100644
|
|||
--- a/CMakeLists.txt
|
|||
+++ b/CMakeLists.txt
|
|||
@@ -18,14 +18,15 @@
|
|||
# |
|||
cmake_minimum_required (VERSION 2.8.7) |
|||
|
|||
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|||
project (Proton C) |
|||
|
|||
# Enable C++ now for examples and bindings subdirectories, but make it optional. |
|||
enable_language(CXX OPTIONAL) |
|||
|
|||
# Enable testing |
|||
-enable_testing()
|
|||
-include (CTest)
|
|||
+#enable_testing()
|
|||
+#include (CTest)
|
|||
|
|||
# Pull in local cmake modules |
|||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/Modules/") |
|||
@@ -141,7 +142,7 @@ set (BINDINGS_DIR ${LIB_INSTALL_DIR}/proton/bindings)
|
|||
|
|||
set (SYSINSTALL_BINDINGS OFF CACHE BOOL "If SYSINSTALL_BINDINGS is OFF then proton bindings will be installed underneath ${BINDINGS_DIR} and each user will need to modify their interpreter configuration to load the appropriate binding. If SYSINSTALL_BINDINGS is ON, then each language interpreter will be queried for the appropriate directory and proton bindings will be installed and available system wide with no additional per user configuration.") |
|||
|
|||
-set (BINDING_LANGS PERL PHP PYTHON RUBY)
|
|||
+#set (BINDING_LANGS PERL PHP PYTHON RUBY)
|
|||
|
|||
foreach (LANG ${BINDING_LANGS}) |
|||
set (SYSINSTALL_${LANG} OFF CACHE BOOL "Install ${LANG} bindings into interpreter specified location.") |
|||
@@ -156,10 +157,10 @@ set (PROTON_SHARE ${SHARE_INSTALL_DIR}/proton-${PN_VERSION})
|
|||
# End of variables used during install |
|||
|
|||
# Check for valgrind here so tests under proton-c/ and examples/ can use it. |
|||
-find_program(VALGRIND_EXE valgrind DOC "Location of the valgrind program")
|
|||
+#find_program(VALGRIND_EXE valgrind DOC "Location of the valgrind program")
|
|||
mark_as_advanced (VALGRIND_EXE) |
|||
diff -ur a/c/CMakeLists.txt b/c/CMakeLists.txt
|
|||
--- a/c/CMakeLists.txt 2019-12-09 07:17:00.000000000 -0700
|
|||
+++ b/c/CMakeLists.txt 2020-01-08 16:15:26.837987469 -0700
|
|||
@@ -428,18 +428,18 @@
|
|||
# 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} ${TIME_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>)
|
|||
-
|
|||
-add_library (qpid-proton-core SHARED $<TARGET_OBJECTS:qpid-proton-core-objects>)
|
|||
-target_link_libraries (qpid-proton-core ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS})
|
|||
-set_target_properties (qpid-proton-core
|
|||
- PROPERTIES
|
|||
- VERSION "${PN_LIB_CORE_VERSION}"
|
|||
- SOVERSION "${PN_LIB_CORE_MAJOR_VERSION}"
|
|||
- LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
-)
|
|||
+#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>)
|
|||
+
|
|||
+#add_library (qpid-proton-core SHARED $<TARGET_OBJECTS:qpid-proton-core-objects>)
|
|||
+#target_link_libraries (qpid-proton-core ${SSL_LIB} ${SASL_LIB} ${TIME_LIB} ${PLATFORM_LIBS})
|
|||
+#set_target_properties (qpid-proton-core
|
|||
+# PROPERTIES
|
|||
+# VERSION "${PN_LIB_CORE_VERSION}"
|
|||
+# SOVERSION "${PN_LIB_CORE_MAJOR_VERSION}"
|
|||
+# LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
+#)
|
|||
|
|||
if (BUILD_STATIC_LIBS) |
|||
add_library (qpid-proton-core-static STATIC ${qpid-proton-core-src}) |
|||
@@ -454,14 +454,14 @@
|
|||
${qpid-proton-include-extra} |
|||
) |
|||
|
|||
-option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON)
|
|||
+#option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON)
|
|||
if (ENABLE_VALGRIND) |
|||
if (NOT VALGRIND_EXE) |
|||
message(STATUS "Can't locate the valgrind command; no run-time error detection") |
|||
@@ -171,7 +172,7 @@ if (ENABLE_VALGRIND)
|
|||
endif (ENABLE_VALGRIND) |
|||
-add_library (qpid-proton SHARED $<TARGET_OBJECTS:qpid-proton-core-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
|
|||
- PROPERTIES
|
|||
- VERSION "${PN_LIB_LEGACY_VERSION}"
|
|||
- SOVERSION "${PN_LIB_LEGACY_MAJOR_VERSION}"
|
|||
- LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
-)
|
|||
+# add_library (qpid-proton SHARED $<TARGET_OBJECTS:qpid-proton-core-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
|
|||
+# PROPERTIES
|
|||
+# VERSION "${PN_LIB_LEGACY_VERSION}"
|
|||
+# SOVERSION "${PN_LIB_LEGACY_MAJOR_VERSION}"
|
|||
+# LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
+# )
|
|||
|
|||
if (BUILD_STATIC_LIBS) |
|||
add_library(qpid-proton-static STATIC ${qpid-proton-core-src} ${qpid-proton-noncore-src}) |
|||
@@ -482,15 +482,15 @@
|
|||
|
|||
if (qpid-proton-proactor) |
|||
set(HAS_PROACTOR True) |
|||
- add_library (qpid-proton-proactor SHARED ${qpid-proton-proactor})
|
|||
- target_link_libraries (qpid-proton-proactor LINK_PUBLIC qpid-proton-core)
|
|||
- target_link_libraries (qpid-proton-proactor LINK_PRIVATE ${PLATFORM_LIBS} ${PROACTOR_LIBS})
|
|||
- set_target_properties (qpid-proton-proactor
|
|||
- PROPERTIES
|
|||
- VERSION "${PN_LIB_PROACTOR_VERSION}"
|
|||
- SOVERSION "${PN_LIB_PROACTOR_MAJOR_VERSION}"
|
|||
- LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
- )
|
|||
+ # add_library (qpid-proton-proactor SHARED ${qpid-proton-proactor})
|
|||
+ # target_link_libraries (qpid-proton-proactor LINK_PUBLIC qpid-proton-core)
|
|||
+ # target_link_libraries (qpid-proton-proactor LINK_PRIVATE ${PLATFORM_LIBS} ${PROACTOR_LIBS})
|
|||
+ # set_target_properties (qpid-proton-proactor
|
|||
+ # PROPERTIES
|
|||
+ # VERSION "${PN_LIB_PROACTOR_VERSION}"
|
|||
+ # SOVERSION "${PN_LIB_PROACTOR_MAJOR_VERSION}"
|
|||
+ # LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
+ # )
|
|||
if (BUILD_STATIC_LIBS) |
|||
add_library (qpid-proton-proactor-static STATIC ${qpid-proton-proactor}) |
|||
endif(BUILD_STATIC_LIBS) |
|||
@@ -500,11 +500,11 @@
|
|||
if (BUILD_STATIC_LIBS) |
|||
set(STATIC_LIBS qpid-proton-static qpid-proton-core-static) |
|||
endif() |
|||
-install(TARGETS qpid-proton qpid-proton-core ${STATIC_LIBS}
|
|||
- EXPORT proton
|
|||
- RUNTIME DESTINATION bin
|
|||
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
|||
- LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
|||
+# install(TARGETS qpid-proton qpid-proton-core ${STATIC_LIBS}
|
|||
+# EXPORT proton
|
|||
+# RUNTIME DESTINATION bin
|
|||
+# ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
|||
+# LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
|||
|
|||
# Install windows pdb files |
|||
if (MSVC) |
|||
@@ -520,11 +520,11 @@
|
|||
if (BUILD_STATIC_LIBS) |
|||
set(STATIC_LIBS qpid-proton-proactor-static) |
|||
endif() |
|||
- install(TARGETS qpid-proton-proactor ${STATIC_LIBS}
|
|||
- EXPORT proton
|
|||
- RUNTIME DESTINATION bin
|
|||
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
|||
- LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
|||
+ # install(TARGETS qpid-proton-proactor ${STATIC_LIBS}
|
|||
+ # EXPORT proton
|
|||
+ # RUNTIME DESTINATION bin
|
|||
+ # ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
|||
+ # LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
|||
|
|||
# Install windows pdb files |
|||
if (MSVC) |
|||
@@ -576,10 +576,10 @@
|
|||
${CMAKE_CURRENT_BINARY_DIR}/ProtonConfigVersion.cmake |
|||
DESTINATION ${LIB_INSTALL_DIR}/cmake/Proton) |
|||
|
|||
add_subdirectory(proton-c) |
|||
-add_subdirectory(docs)
|
|||
-add_subdirectory(examples)
|
|||
-add_subdirectory(tests)
|
|||
-add_subdirectory(tools)
|
|||
+# add_subdirectory(docs)
|
|||
+# add_subdirectory(examples)
|
|||
+# add_subdirectory(tests)
|
|||
+# add_subdirectory(tools)
|
|||
|
|||
install (DIRECTORY examples/ |
|||
DESTINATION "${PROTON_SHARE}/examples/c" |
|||
diff -ur a/CMakeLists.txt b/CMakeLists.txt
|
|||
--- a/CMakeLists.txt 2019-12-09 07:17:00.000000000 -0700
|
|||
+++ b/CMakeLists.txt 2019-12-19 18:11:57.128248724 -0700
|
|||
@@ -24,7 +24,7 @@
|
|||
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/Modules") |
|||
set (CMAKE_THREAD_PREFER_PTHREAD TRUE) |
|||
|
|||
install (FILES LICENSE README.md |
|||
DESTINATION ${PROTON_SHARE}) |
|||
diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt
|
|||
index 304d899..f4877b4 100644
|
|||
--- a/examples/cpp/CMakeLists.txt
|
|||
+++ b/examples/cpp/CMakeLists.txt
|
|||
@@ -17,6 +17,7 @@
|
|||
# under the License. |
|||
# |
|||
|
|||
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|||
find_package(ProtonCpp REQUIRED) |
|||
|
|||
include_directories(${ProtonCpp_INCLUDE_DIRS}) |
|||
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
|
|||
index 8edb661..dc7b99c 100644
|
|||
--- a/proton-c/CMakeLists.txt
|
|||
+++ b/proton-c/CMakeLists.txt
|
|||
@@ -22,24 +22,24 @@ include(CheckSymbolExists)
|
|||
|
|||
include(soversion.cmake) |
|||
|
|||
-add_custom_target(docs)
|
|||
-add_custom_target(doc DEPENDS docs)
|
|||
+#add_custom_target(docs)
|
|||
+#add_custom_target(doc DEPENDS docs)
|
|||
|
|||
# Set the default SSL/TLS implementation |
|||
-find_package(OpenSSL)
|
|||
+#find_package(OpenSSL)
|
|||
-include (CTest)
|
|||
+# include (CTest)
|
|||
include (CheckLanguage) |
|||
include (CheckLibraryExists) |
|||
include (CheckSymbolExists) |
|||
@@ -33,13 +33,13 @@
|
|||
find_package (OpenSSL) |
|||
find_package (Threads) |
|||
find_package (PythonInterp REQUIRED) |
|||
-find_package (SWIG)
|
|||
+# find_package (SWIG)
|
|||
# FindSwig.cmake "forgets" make its outputs advanced like a good citizen |
|||
mark_as_advanced(SWIG_DIR SWIG_EXECUTABLE SWIG_VERSION) |
|||
|
|||
# See if Cyrus SASL is available |
|||
-find_library(CYRUS_SASL_LIBRARY sasl2)
|
|||
-find_path(CYRUS_SASL_INCLUDE_DIR sasl/sasl.h PATH_SUFFIXES include)
|
|||
-find_package_handle_standard_args(CyrusSASL DEFAULT_MSG CYRUS_SASL_LIBRARY CYRUS_SASL_INCLUDE_DIR)
|
|||
+#find_library(CYRUS_SASL_LIBRARY sasl2)
|
|||
+#find_path(CYRUS_SASL_INCLUDE_DIR sasl/sasl.h PATH_SUFFIXES include)
|
|||
+#find_package_handle_standard_args(CyrusSASL DEFAULT_MSG CYRUS_SASL_LIBRARY CYRUS_SASL_INCLUDE_DIR)
|
|||
mark_as_advanced(CYRUS_SASL_LIBRARY CYRUS_SASL_INCLUDE_DIR) |
|||
find_package (CyrusSASL) |
|||
|
|||
# Find saslpasswd2 executable to generate test config |
|||
-find_program(SASLPASSWD_EXE saslpasswd2 DOC "Program used to make SASL user db for testing")
|
|||
+#find_program(SASLPASSWD_EXE saslpasswd2 DOC "Program used to make SASL user db for testing")
|
|||
mark_as_advanced(SASLPASSWD_EXE) |
|||
|
|||
if(WIN32 AND NOT CYGWIN) |
|||
@@ -315,8 +315,8 @@ pn_absolute_install_dir(EXEC_PREFIX "." ${CMAKE_INSTALL_PREFIX})
|
|||
pn_absolute_install_dir(LIBDIR ${LIB_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}) |
|||
pn_absolute_install_dir(INCLUDEDIR ${INCLUDE_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}) |
|||
|
|||
-add_subdirectory(docs/api)
|
|||
-add_subdirectory(../tests/tools/apps/c ../tests/tools/apps/c)
|
|||
+#add_subdirectory(docs/api)
|
|||
+#add_subdirectory(../tests/tools/apps/c ../tests/tools/apps/c)
|
|||
|
|||
# for full source distribution: |
|||
set (qpid-proton-platform-all |
|||
@@ -507,7 +507,7 @@ if (BUILD_WITH_CXX)
|
|||
endif (BUILD_WITH_CXX) |
|||
|
|||
add_library ( |
|||
- qpid-proton-core SHARED
|
|||
+ qpid-proton-core STATIC
|
|||
${qpid-proton-core} |
|||
${qpid-proton-layers} |
|||
${qpid-proton-platform} |
|||
@@ -527,7 +527,7 @@ set_target_properties (
|
|||
) |
|||
-enable_testing ()
|
|||
+#enable_testing ()
|
|||
|
|||
add_library( |
|||
- qpid-proton SHARED
|
|||
+ qpid-proton STATIC
|
|||
# Proton Core |
|||
${qpid-proton-core} |
|||
${qpid-proton-layers} |
|||
@@ -629,7 +629,7 @@ install (FILES
|
|||
# Set up runtime checks (valgrind, sanitizers etc.) |
|||
-include(tests/RuntimeCheck.cmake)
|
|||
+# include(tests/RuntimeCheck.cmake)
|
|||
|
|||
# c tests: |
|||
## Variables used across components |
|||
|
|||
-add_subdirectory(src/tests)
|
|||
+#add_subdirectory(src/tests)
|
|||
@@ -260,7 +260,7 @@
|
|||
|
|||
if (CMAKE_SYSTEM_NAME STREQUAL Windows) |
|||
# No change needed for windows already use correct separator |
|||
@@ -712,7 +712,7 @@ if (BUILD_PYTHON)
|
|||
set (SYSINSTALL_BINDINGS OFF CACHE BOOL "If SYSINSTALL_BINDINGS is OFF then proton bindings will be installed underneath ${BINDINGS_DIR} and each user will need to modify their interpreter configuration to load the appropriate binding. If SYSINSTALL_BINDINGS is ON, then each language interpreter will be queried for the appropriate directory and proton bindings will be installed and available system wide with no additional per user configuration.") |
|||
|
|||
endif (BUILD_PYTHON) |
|||
-set (BINDING_LANGS PYTHON RUBY)
|
|||
+# set (BINDING_LANGS PYTHON RUBY)
|
|||
|
|||
-find_program(RUBY_EXE "ruby")
|
|||
+#find_program(RUBY_EXE "ruby")
|
|||
if (RUBY_EXE AND BUILD_RUBY) |
|||
set (rb_root "${pn_test_root}/ruby") |
|||
set (rb_src "${CMAKE_CURRENT_SOURCE_DIR}/bindings/ruby") |
|||
@@ -751,8 +751,8 @@ if (RUBY_EXE AND BUILD_RUBY)
|
|||
else (DEFAULT_RUBY_TESTING) |
|||
message(STATUS "Skipping Ruby tests: missing dependencies") |
|||
endif (DEFAULT_RUBY_TESTING) |
|||
-else (RUBY_EXE)
|
|||
- message (STATUS "Cannot find ruby, skipping ruby tests")
|
|||
+#else (RUBY_EXE)
|
|||
+# message (STATUS "Cannot find ruby, skipping ruby tests")
|
|||
foreach (LANG ${BINDING_LANGS}) |
|||
set (SYSINSTALL_${LANG} OFF CACHE BOOL "Install ${LANG} bindings into interpreter specified location.") |
|||
@@ -315,7 +315,7 @@
|
|||
endif() |
|||
|
|||
mark_as_advanced (RUBY_EXE RSPEC_EXE) |
|||
diff --git a/proton-c/bindings/CMakeLists.txt b/proton-c/bindings/CMakeLists.txt
|
|||
index 6b88384..d1a50a5 100644
|
|||
--- a/proton-c/bindings/CMakeLists.txt
|
|||
+++ b/proton-c/bindings/CMakeLists.txt
|
|||
@@ -19,14 +19,14 @@
|
|||
|
|||
# Add bindings that do not require swig here - the directory name must be the same as the binding name |
|||
# See below for swig bindings |
|||
-set(BINDINGS javascript cpp go)
|
|||
+set(BINDINGS cpp)
|
|||
|
|||
# Prerequisites for javascript. |
|||
# |
|||
# It uses a C/C++ to JavaScript cross-compiler called emscripten (https://github.com/kripken/emscripten). Emscripten takes C/C++ |
|||
# and compiles it into a highly optimisable subset of JavaScript called asm.js (http://asmjs.org/) that can be |
|||
# aggressively optimised and run at near-native speed (usually between 1.5 to 10 times slower than native C/C++). |
|||
-find_package(Emscripten)
|
|||
+#find_package(Emscripten)
|
|||
if (EMSCRIPTEN_FOUND) |
|||
set (DEFAULT_JAVASCRIPT ON) |
|||
endif (EMSCRIPTEN_FOUND) |
|||
@@ -37,7 +37,7 @@ if (CMAKE_CXX_COMPILER)
|
|||
endif (CMAKE_CXX_COMPILER) |
|||
|
|||
# Prerequisites for Go |
|||
-find_program(GO_EXE go)
|
|||
+# find_program(GO_EXE go)
|
|||
mark_as_advanced(GO_EXE) |
|||
if (GO_EXE) |
|||
if(WIN32) |
|||
diff --git a/proton-c/bindings/cpp/CMakeLists.txt b/proton-c/bindings/cpp/CMakeLists.txt
|
|||
index 0cc4024..796fe29 100644
|
|||
--- a/proton-c/bindings/cpp/CMakeLists.txt
|
|||
+++ b/proton-c/bindings/cpp/CMakeLists.txt
|
|||
@@ -16,7 +16,7 @@
|
|||
# specific language governing permissions and limitations |
|||
# under the License. |
|||
# |
|||
-
|
|||
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|||
include(cpp.cmake) # Compiler checks |
|||
|
|||
include_directories( |
|||
@@ -89,7 +89,7 @@ set_source_files_properties (
|
|||
COMPILE_FLAGS "${LTO}" |
|||
) |
|||
set (DEFAULT_GO ON) |
|||
diff -ur a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
|
|||
--- a/cpp/CMakeLists.txt 2019-12-09 07:17:00.000000000 -0700
|
|||
+++ b/cpp/CMakeLists.txt 2020-01-08 16:20:18.855394195 -0700
|
|||
@@ -174,30 +174,30 @@
|
|||
set (CMAKE_DEBUG_POSTFIX "d") |
|||
endif () |
|||
|
|||
-add_library(qpid-proton-cpp SHARED ${qpid-proton-cpp-source})
|
|||
+add_library(qpid-proton-cpp STATIC ${qpid-proton-cpp-source})
|
|||
|
|||
target_link_libraries (qpid-proton-cpp ${PLATFORM_LIBS} qpid-proton) |
|||
|
|||
@@ -120,8 +120,8 @@ endif (MSVC)
|
|||
+# add_library(qpid-proton-cpp SHARED ${qpid-proton-cpp-source})
|
|||
if(BUILD_STATIC_LIBS) |
|||
add_library(qpid-proton-cpp-static STATIC ${qpid-proton-cpp-source}) |
|||
set(STATIC_LIBS qpid-proton-cpp-static) |
|||
endif(BUILD_STATIC_LIBS) |
|||
|
|||
-target_link_libraries (qpid-proton-cpp LINK_PRIVATE ${PLATFORM_LIBS} qpid-proton-core qpid-proton-proactor ${CONNECT_CONFIG_LIBS})
|
|||
+# target_link_libraries (qpid-proton-cpp LINK_PRIVATE ${PLATFORM_LIBS} qpid-proton-core qpid-proton-proactor ${CONNECT_CONFIG_LIBS})
|
|||
|
|||
-set_target_properties (
|
|||
- qpid-proton-cpp
|
|||
- PROPERTIES
|
|||
- LINKER_LANGUAGE CXX
|
|||
- VERSION "${PN_LIB_CPP_VERSION}"
|
|||
- SOVERSION "${PN_LIB_CPP_MAJOR_VERSION}"
|
|||
- LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
- )
|
|||
+# set_target_properties (
|
|||
+# qpid-proton-cpp
|
|||
+# PROPERTIES
|
|||
+# LINKER_LANGUAGE CXX
|
|||
+# VERSION "${PN_LIB_CPP_VERSION}"
|
|||
+# SOVERSION "${PN_LIB_CPP_MAJOR_VERSION}"
|
|||
+# LINK_FLAGS "${CATCH_UNDEFINED} ${LTO}"
|
|||
+# )
|
|||
|
|||
## Install |
|||
|
|||
-install(TARGETS qpid-proton-cpp ${STATIC_LIBS}
|
|||
- EXPORT proton-cpp
|
|||
- RUNTIME DESTINATION bin
|
|||
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
|||
- LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
|||
+# install(TARGETS qpid-proton-cpp ${STATIC_LIBS}
|
|||
+# EXPORT proton-cpp
|
|||
+# RUNTIME DESTINATION bin
|
|||
+# ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
|||
+# LIBRARY DESTINATION ${LIB_INSTALL_DIR})
|
|||
|
|||
# Install windows qpid-proton-cpp pdb files |
|||
if (MSVC) |
|||
@@ -209,12 +209,12 @@
|
|||
|
|||
install (DIRECTORY "include/proton" DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.hpp") |
|||
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/config_presets.hpp" DESTINATION "${INCLUDE_INSTALL_DIR}/proton/internal") |
|||
-install (DIRECTORY "examples/"
|
|||
- DESTINATION "${PROTON_SHARE}/examples/cpp"
|
|||
- USE_SOURCE_PERMISSIONS
|
|||
- PATTERN "ProtonCppConfig.cmake" EXCLUDE)
|
|||
+# install (DIRECTORY "examples/"
|
|||
+# DESTINATION "${PROTON_SHARE}/examples/cpp"
|
|||
+# USE_SOURCE_PERMISSIONS
|
|||
+# PATTERN "ProtonCppConfig.cmake" EXCLUDE)
|
|||
|
|||
-add_subdirectory(docs)
|
|||
-add_subdirectory(${CMAKE_SOURCE_DIR}/tests/tools/apps/cpp ${CMAKE_BINARY_DIR}/tests/tools/apps/cpp)
|
|||
+#add_subdirectory(docs)
|
|||
+#add_subdirectory(${CMAKE_SOURCE_DIR}/tests/tools/apps/cpp ${CMAKE_BINARY_DIR}/tests/tools/apps/cpp)
|
|||
-add_subdirectory(examples)
|
|||
+# add_subdirectory(examples)
|
|||
add_subdirectory(docs) |
|||
|
|||
# Pkg config file |
|||
configure_file( |
|||
@@ -171,12 +171,12 @@ macro(add_cpp_test test)
|
|||
@@ -268,40 +268,40 @@
|
|||
set(test_env ${test_env} "PATH=$<TARGET_FILE_DIR:qpid-proton>") |
|||
endif() |
|||
endmacro(add_cpp_test) |
|||
|
|||
-macro(add_cpp_test test)
|
|||
- add_executable (${test} src/${test}.cpp)
|
|||
- target_link_libraries (${test} qpid-proton-cpp ${PLATFORM_LIBS})
|
|||
- add_test (NAME cpp-${test}
|
|||
- COMMAND ${PN_ENV_SCRIPT} -- ${test_env} ${TEST_EXE_PREFIX_CMD} $<TARGET_FILE:${test}> ${ARGN})
|
|||
-endmacro(add_cpp_test)
|
|||
-
|
|||
-add_cpp_test(codec_test)
|
|||
+#add_cpp_test(codec_test)
|
|||
#add_cpp_test(engine_test) |
|||
-add_cpp_test(thread_safe_test)
|
|||
-add_cpp_test(connection_driver_test)
|
|||
-add_cpp_test(interop_test ${CMAKE_SOURCE_DIR}/tests)
|
|||
-add_cpp_test(message_test)
|
|||
-add_cpp_test(map_test)
|
|||
-add_cpp_test(scalar_test)
|
|||
-add_cpp_test(value_test)
|
|||
-add_cpp_test(container_test)
|
|||
-add_cpp_test(url_test)
|
|||
+#add_cpp_test(thread_safe_test)
|
|||
-add_cpp_test(reconnect_test)
|
|||
-add_cpp_test(link_test)
|
|||
-add_cpp_test(credit_test)
|
|||
-if (ENABLE_JSONCPP)
|
|||
- add_cpp_test(connect_config_test)
|
|||
- target_link_libraries(connect_config_test qpid-proton-core) # For pn_sasl_enabled
|
|||
- set_tests_properties(cpp-connect_config_test PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
|||
- # Test data and output directories for connect_config_test
|
|||
- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/testdata" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
|||
-endif()
|
|||
+# macro(add_cpp_test test)
|
|||
+# add_executable (${test} src/${test}.cpp)
|
|||
+# target_link_libraries (${test} qpid-proton-cpp ${PLATFORM_LIBS})
|
|||
+# add_test (NAME cpp-${test}
|
|||
+# COMMAND ${PN_ENV_SCRIPT} -- ${test_env} ${TEST_EXE_PREFIX_CMD} $<TARGET_FILE:${test}> ${ARGN})
|
|||
+# endmacro(add_cpp_test)
|
|||
+#
|
|||
+# add_cpp_test(codec_test)
|
|||
+# add_cpp_test(connection_driver_test)
|
|||
+# add_cpp_test(interop_test ${CMAKE_SOURCE_DIR}/tests)
|
|||
+# add_cpp_test(message_test)
|
|||
+# add_cpp_test(map_test)
|
|||
+# add_cpp_test(scalar_test)
|
|||
+# add_cpp_test(value_test)
|
|||
+# add_cpp_test(container_test)
|
|||
+#add_cpp_test(url_test)
|
|||
diff --git a/proton-c/bindings/cpp/docs/CMakeLists.txt b/proton-c/bindings/cpp/docs/CMakeLists.txt
|
|||
index d512d15..8576867 100644
|
|||
--- a/proton-c/bindings/cpp/docs/CMakeLists.txt
|
|||
+++ b/proton-c/bindings/cpp/docs/CMakeLists.txt
|
|||
@@ -17,7 +17,7 @@
|
|||
# under the License. |
|||
# |
|||
|
|||
-find_package(Doxygen)
|
|||
+#find_package(Doxygen)
|
|||
|
|||
if (DOXYGEN_FOUND) |
|||
configure_file ( |
|||
diff --git a/proton-c/docs/api/CMakeLists.txt b/proton-c/docs/api/CMakeLists.txt
|
|||
index 7756e48..71ebb93 100644
|
|||
--- a/proton-c/docs/api/CMakeLists.txt
|
|||
+++ b/proton-c/docs/api/CMakeLists.txt
|
|||
@@ -17,7 +17,7 @@
|
|||
# under the License. |
|||
# |
|||
|
|||
-find_package(Doxygen)
|
|||
+#find_package(Doxygen)
|
|||
if (DOXYGEN_FOUND) |
|||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in |
|||
${CMAKE_CURRENT_BINARY_DIR}/user.doxygen) |
|||
--
|
|||
2.7.4 |
|||
|
|||
+# add_cpp_test(reconnect_test)
|
|||
+# add_cpp_test(link_test)
|
|||
+# add_cpp_test(credit_test)
|
|||
+# if (ENABLE_JSONCPP)
|
|||
+# add_cpp_test(connect_config_test)
|
|||
+# target_link_libraries(connect_config_test qpid-proton-core) # For pn_sasl_enabled
|
|||
+# set_tests_properties(cpp-connect_config_test PROPERTIES WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
|
|||
+# # Test data and output directories for connect_config_test
|
|||
+# file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/testdata" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
|||
+# endif()
|
|||
|
|||
# TODO aconway 2018-10-31: Catch2 tests |
|||
# This is a simple example of a C++ test using the Catch2 framework. |
|||
# See c/tests/ for more interesting examples. |
|||
# Eventually all the C++ tests will migrate to Catch2. |
|||
|
|||
-include_directories(${CMAKE_SOURCE_DIR}/tests/include)
|
|||
-add_executable(cpp-test src/cpp-test.cpp src/url_test.cpp)
|
|||
-target_link_libraries(cpp-test qpid-proton-cpp ${PLATFORM_LIBS})
|
|||
+#include_directories(${CMAKE_SOURCE_DIR}/tests/include)
|
|||
+#add_executable(cpp-test src/cpp-test.cpp src/url_test.cpp)
|
|||
+#target_link_libraries(cpp-test qpid-proton-cpp ${PLATFORM_LIBS})
|
|||
|
|||
macro(add_catch_test tag) |
|||
add_test ( |
|||
|
@ -0,0 +1,64 @@ |
|||
#!/bin/bash |
|||
# Copyright (c) 2019-2020 radix42 |
|||
# Copyright (c) 2019-2020 The Hush developers |
|||
# Original aarch64 port by radix42. Thank you! |
|||
|
|||
set -eu -o pipefail |
|||
|
|||
cat <<'EOF' |
|||
________________ |
|||
< Building Hush! > |
|||
---------------- |
|||
\ ^__^ |
|||
\ (oo)\_______ |
|||
(__)\ )\/\ |
|||
||----w | |
|||
|| || |
|||
EOF |
|||
|
|||
if [ "x$*" = 'x--help' ] |
|||
then |
|||
cat ./zcutil/dragon.txt |
|||
cat <<EOF |
|||
Welcome To The Hush Build System, Here Be Dragons! |
|||
Usage: |
|||
$0 --help |
|||
Show this help message and exit. |
|||
$0 [ --enable-lcov ] [ MAKEARGS... ] |
|||
Build Hush and most of its transitive dependencies from |
|||
source. MAKEARGS are applied to both dependencies and Hush itself. If |
|||
--enable-lcov is passed, Hush is configured to add coverage |
|||
instrumentation, thus enabling "make cov" to work. |
|||
EOF |
|||
exit 0 |
|||
fi |
|||
|
|||
set -x |
|||
cd "$(dirname "$(readlink -f "$0")")/.." |
|||
|
|||
# If --enable-lcov is the first argument, enable lcov coverage support: |
|||
LCOV_ARG='' |
|||
HARDENING_ARG='--disable-hardening' |
|||
if [ "x${1:-}" = 'x--enable-lcov' ] |
|||
then |
|||
LCOV_ARG='--enable-lcov' |
|||
HARDENING_ARG='--disable-hardening' |
|||
shift |
|||
fi |
|||
|
|||
# BUG: parameterize the platform/host directory: |
|||
PREFIX="$(pwd)/depends/aarch64-linux-gnu/" |
|||
|
|||
HOST=aarch64-linux-gnu make "$@" -C ./depends/ V=1 NO_QT=1 |
|||
./autogen.sh |
|||
CONFIG_SITE="$(pwd)/depends/aarch64-linux-gnu/share/config.site" ./configure --prefix="${PREFIX}" --with-gui=no --enable-tests=no "$HARDENING_ARG" "$LCOV_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -g' |
|||
|
|||
#BUILD CCLIB |
|||
|
|||
WD=$PWD |
|||
cd src/cc |
|||
echo $PWD |
|||
HOST=aarch64-linux-gnu ./makecustom |
|||
cd $WD |
|||
|
|||
make "$@" V=1 |
Loading…
Reference in new issue