You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2020/10/08 19:13:57 UTC

[qpid-proton] branch master updated: PROTON-2171: Add BUILD_EXAMPLES option to optionally skip building examples (#272)

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

jdanek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new e610957  PROTON-2171: Add BUILD_EXAMPLES option to optionally skip building examples (#272)
e610957 is described below

commit e610957f4add371df4a9f847dcbefa39497a3cc0
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Thu Oct 8 21:02:28 2020 +0200

    PROTON-2171: Add BUILD_EXAMPLES option to optionally skip building examples (#272)
---
 CMakeLists.txt     | 6 +++++-
 c/CMakeLists.txt   | 5 +++--
 cpp/CMakeLists.txt | 4 +++-
 go/CMakeLists.txt  | 4 +++-
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5fe49f3..08519d9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -162,6 +162,8 @@ option(ENABLE_HIDE_UNEXPORTED_SYMBOLS "Only export library symbols that are expl
 option(ENABLE_FUZZ_TESTING "Enable building fuzzers and regression testing with libFuzzer" ${DEFAULT_FUZZ_TESTING})
 option(ENABLE_BENCHMARKS "Enable building and running benchmarks with Google Benchmark" ${DEFAULT_BENCHMARKS})
 
+option(BUILD_EXAMPLES "Enable building example programs" ON)
+
 # Set any additional compiler specific flags
 set (LTO_GNU "-flto -fno-fat-lto-objects")
 set (LTO_Clang "-flto=thin")
@@ -429,4 +431,6 @@ configure_file(${CMAKE_SOURCE_DIR}/misc/config.sh.in
 configure_file(${CMAKE_SOURCE_DIR}/misc/config.bat.in
                ${CMAKE_BINARY_DIR}/config.bat @ONLY)
 
-add_subdirectory(tests/examples)
+if (BUILD_EXAMPLES)
+  add_subdirectory(tests/examples)
+endif (BUILD_EXAMPLES)
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
index 89028fb..dcbeae4 100644
--- a/c/CMakeLists.txt
+++ b/c/CMakeLists.txt
@@ -582,8 +582,9 @@ if (ENABLE_BENCHMARKS)
 endif (ENABLE_BENCHMARKS)
 
 add_subdirectory(docs)
-add_subdirectory(examples)
-add_subdirectory(tests)
+if (BUILD_EXAMPLES)
+  add_subdirectory(examples)
+endif (BUILD_EXAMPLES)
 add_subdirectory(tools)
 
 install (DIRECTORY examples/
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index 7d4ed98..cd263ae 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -207,7 +207,9 @@ set(PROTONCPPLIB ${CMAKE_SHARED_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_SHARED_LIB
 set(PROTONCPPLIBDEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}qpid-proton-cpp${CMAKE_DEBUG_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif ()
 
-add_subdirectory(examples)
+if (BUILD_EXAMPLES)
+  add_subdirectory(examples)
+endif (BUILD_EXAMPLES)
 add_subdirectory(docs)
 
 # Pkg config file
diff --git a/go/CMakeLists.txt b/go/CMakeLists.txt
index 44fd2b9..14d81f4 100644
--- a/go/CMakeLists.txt
+++ b/go/CMakeLists.txt
@@ -88,7 +88,9 @@ if (BUILD_GO)
   # Clean up go output directories.
   list(APPEND ADDITIONAL_MAKE_CLEAN_FILES ${GOPATH}/pkg ${GOPATH}/bin)
 
-  add_subdirectory(examples)
+  if (BUILD_EXAMPLES)
+    add_subdirectory(examples)
+  endif (BUILD_EXAMPLES)
 
   # Install go sources.
   set (GO_INSTALL_DIR ${SHARE_INSTALL_DIR}/gocode/pkg CACHE PATH "Installation directory for Go code")


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