You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2021/07/27 17:53:22 UTC

[celix] branch feature/pubsub-interceptor-fix updated (821488d -> b29d587)

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

pnoltes pushed a change to branch feature/pubsub-interceptor-fix
in repository https://gitbox.apache.org/repos/asf/celix.git.


    from 821488d  Update CI config to try and limit the nr of parallel sub-make processes due to the required mem.
     new 7ec75a7  Refactors setting the C++ standard, because osx has issues building with the prev setup.
     new b29d587  Moves some test code to a gtest folder, so that coverage will skips these

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:
 CMakeLists.txt                                     |  3 +-
 bundles/cxx_remote_services/admin/CMakeLists.txt   |  1 -
 .../cxx_remote_services/admin/gtest/CMakeLists.txt |  1 -
 .../discovery_configured/CMakeLists.txt            |  1 -
 .../discovery_configured/gtest/CMakeLists.txt      |  2 -
 .../cxx_remote_services/integration/CMakeLists.txt |  4 -
 .../integration/gtest/CMakeLists.txt               |  1 -
 bundles/cxx_remote_services/rsa_spi/CMakeLists.txt |  2 -
 .../topology_manager/CMakeLists.txt                |  3 +-
 bundles/pubsub/integration/CMakeLists.txt          | 86 +++++++++++-----------
 .../{src => gtest}/loopback_activator.c            |  0
 bundles/pubsub/integration/{src => gtest}/msg.h    |  0
 .../{src => gtest}/receive_count_service.h         |  0
 .../{src => gtest}/serializer_activator.cc         |  0
 .../integration/{src => gtest}/sut_activator.c     |  0
 .../{src => gtest}/sut_endpoint_activator.c        |  0
 .../integration/{src => gtest}/tst_activator.c     |  0
 .../{src => gtest}/tst_endpoint_activator.c        |  0
 .../pubsub_serializer_avrobin/gtest/CMakeLists.txt |  1 -
 .../pubsub_serializer_json/gtest/CMakeLists.txt    |  1 -
 bundles/pubsub/pubsub_spi/gtest/CMakeLists.txt     |  1 -
 bundles/pubsub/pubsub_utils/gtest/CMakeLists.txt   |  1 -
 bundles/shell/shell/CMakeLists.txt                 |  1 +
 examples/CMakeLists.txt                            |  2 +-
 libs/framework/CMakeLists.txt                      |  2 +
 libs/promises/CMakeLists.txt                       |  2 -
 libs/promises/gtest/CMakeLists.txt                 |  1 -
 27 files changed, 50 insertions(+), 66 deletions(-)
 rename bundles/pubsub/integration/{src => gtest}/loopback_activator.c (100%)
 rename bundles/pubsub/integration/{src => gtest}/msg.h (100%)
 rename bundles/pubsub/integration/{src => gtest}/receive_count_service.h (100%)
 rename bundles/pubsub/integration/{src => gtest}/serializer_activator.cc (100%)
 rename bundles/pubsub/integration/{src => gtest}/sut_activator.c (100%)
 rename bundles/pubsub/integration/{src => gtest}/sut_endpoint_activator.c (100%)
 rename bundles/pubsub/integration/{src => gtest}/tst_activator.c (100%)
 rename bundles/pubsub/integration/{src => gtest}/tst_endpoint_activator.c (100%)

[celix] 02/02: Moves some test code to a gtest folder, so that coverage will skips these

Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/pubsub-interceptor-fix
in repository https://gitbox.apache.org/repos/asf/celix.git

commit b29d587d5bbf0db5399025b3886809d252956ae1
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Tue Jul 27 19:52:47 2021 +0200

    Moves some test code to a gtest folder, so that coverage will skips these
---
 bundles/pubsub/integration/CMakeLists.txt          | 86 +++++++++++-----------
 .../{src => gtest}/loopback_activator.c            |  0
 bundles/pubsub/integration/{src => gtest}/msg.h    |  0
 .../{src => gtest}/receive_count_service.h         |  0
 .../{src => gtest}/serializer_activator.cc         |  0
 .../integration/{src => gtest}/sut_activator.c     |  0
 .../{src => gtest}/sut_endpoint_activator.c        |  0
 .../integration/{src => gtest}/tst_activator.c     |  0
 .../{src => gtest}/tst_endpoint_activator.c        |  0
 9 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/bundles/pubsub/integration/CMakeLists.txt b/bundles/pubsub/integration/CMakeLists.txt
index eaefde9..59207a7 100644
--- a/bundles/pubsub/integration/CMakeLists.txt
+++ b/bundles/pubsub/integration/CMakeLists.txt
@@ -20,10 +20,10 @@ find_package(Jansson REQUIRED)
 add_celix_bundle(pubsub_endpoint_sut
         #"Vanilla" bundle which is under test
         SOURCES
-        src/sut_endpoint_activator.c
+        gtest/sut_endpoint_activator.c
         VERSION 1.0.0
         )
-target_include_directories(pubsub_endpoint_sut PRIVATE src)
+target_include_directories(pubsub_endpoint_sut PRIVATE gtest)
 target_link_libraries(pubsub_endpoint_sut PRIVATE Celix::pubsub_api)
 celix_bundle_files(pubsub_endpoint_sut
         meta_data/msg.descriptor
@@ -37,7 +37,7 @@ celix_bundle_files(pubsub_endpoint_sut
 add_celix_bundle(pubsub_endpoint_tst
         #Test bundle containing cpputests and uses celix_test_runner launcher instead of the celix launcher
         SOURCES
-        src/tst_endpoint_activator.c
+        gtest/tst_endpoint_activator.c
         VERSION 1.0.0
         )
 target_link_libraries(pubsub_endpoint_tst PRIVATE Celix::framework Celix::pubsub_api)
@@ -54,10 +54,10 @@ celix_bundle_files(pubsub_endpoint_tst
 add_celix_bundle(pubsub_loopback
         #"Vanilla" bundle which is under test
         SOURCES
-        src/loopback_activator.c
+        gtest/loopback_activator.c
         VERSION 1.0.0
         )
-target_include_directories(pubsub_loopback PRIVATE src)
+target_include_directories(pubsub_loopback PRIVATE gtest)
 target_link_libraries(pubsub_loopback PRIVATE Celix::pubsub_api)
 celix_bundle_files(pubsub_loopback
         meta_data/msg.descriptor
@@ -75,10 +75,10 @@ celix_bundle_files(pubsub_loopback
 add_celix_bundle(pubsub_sut
     #"Vanilla" bundle which is under test
     SOURCES
-        src/sut_activator.c
+        gtest/sut_activator.c
     VERSION 1.0.0
 )
-target_include_directories(pubsub_sut PRIVATE src)
+target_include_directories(pubsub_sut PRIVATE gtest)
 target_link_libraries(pubsub_sut PRIVATE Celix::pubsub_api)
 celix_bundle_files(pubsub_sut
     meta_data/msg.descriptor
@@ -92,7 +92,7 @@ celix_bundle_files(pubsub_sut
 add_celix_bundle(pubsub_tst
     #Test bundle containing cpputests and uses celix_test_runner launcher instead of the celix launcher
     SOURCES
-        src/tst_activator.c
+        gtest/tst_activator.c
     VERSION 1.0.0
 )
 target_link_libraries(pubsub_tst PRIVATE Celix::framework Celix::pubsub_api)
@@ -108,7 +108,7 @@ celix_bundle_files(pubsub_tst
 add_celix_bundle(pubsub_deadlock_sut
     #"Vanilla" bundle which is used to trigger a publisher added call
     SOURCES
-    src/sut_activator.c
+    gtest/sut_activator.c
     VERSION 1.0.0
 )
 celix_bundle_files(pubsub_deadlock_sut
@@ -130,10 +130,10 @@ celix_get_bundle_file(pubsub_deadlock_sut DEADLOCK_SUT_BUNDLE_FILE)
 add_celix_bundle(pubsub_serializer
         #serializer bundle
         SOURCES
-        src/serializer_activator.cc
+        gtest/serializer_activator.cc
         VERSION 1.0.0
         )
-target_include_directories(pubsub_serializer PRIVATE src)
+target_include_directories(pubsub_serializer PRIVATE gtest)
 target_link_libraries(pubsub_serializer PRIVATE Celix::pubsub_api Celix::pubsub_spi)
 
 if (BUILD_PUBSUB_PSA_UDP_MC)
@@ -152,7 +152,7 @@ if (BUILD_PUBSUB_PSA_UDP_MC)
                 pubsub_tst
     )
     target_link_libraries(pubsub_udpmc_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_udpmc_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_udpmc_tests SYSTEM PRIVATE gtest)
 
     add_celix_container(pstm_deadlock_udpmc_test
             USE_CONFIG #ensures that a config.properties will be created with the launch bundles.
@@ -177,8 +177,8 @@ if (BUILD_PUBSUB_PSA_UDP_MC)
     add_dependencies(pstm_deadlock_udpmc_test pubsub_deadlock_sut_bundle)
 
     #Framework "bundle" has no cache dir. Default as "cache dir" the cwd is used.
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_udpmc_src/META-INF/descriptors/msg.descriptor COPYONLY)
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_udpmc_src/META-INF/topics/pub/deadlock.properties COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_udpmc_gtest/META-INF/descriptors/msg.descriptor COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_udpmc_gtest/META-INF/topics/pub/deadlock.properties COPYONLY)
 
     add_test(NAME pstm_deadlock_udpmc_test COMMAND pstm_deadlock_udpmc_test WORKING_DIRECTORY $<TARGET_PROPERTY:pstm_deadlock_udpmc_test,CONTAINER_LOC>)
     setup_target_for_coverage(pstm_deadlock_udpmc_test SCAN_DIR ..)
@@ -207,7 +207,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_tst
             )
     target_link_libraries(pubsub_tcp_wire_v1_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_wire_v1_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_wire_v1_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_tcp_wire_v1_tests COMMAND pubsub_tcp_wire_v1_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_tcp_wire_v1_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_tcp_wire_v1_tests SCAN_DIR ..)
 
@@ -229,7 +229,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_tst
             )
     target_link_libraries(pubsub_tcp_wire_v2_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_wire_v2_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_wire_v2_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_tcp_wire_v2_tests COMMAND pubsub_tcp_wire_v2_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_tcp_wire_v2_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_tcp_wire_v2_tests SCAN_DIR ..)
 
@@ -252,7 +252,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_tst
     )
     target_link_libraries(pubsub_tcp_wire_v2_with_no_scope_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_wire_v2_with_no_scope_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_wire_v2_with_no_scope_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_tcp_wire_v2_with_no_scope_tests COMMAND pubsub_tcp_wire_v2_with_no_scope_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_tcp_wire_v2_with_no_scope_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_tcp_wire_v2_with_no_scope_tests SCAN_DIR ..)
 
@@ -275,7 +275,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_loopback
             )
     target_link_libraries(pubsub_tcp_endpoint_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_endpoint_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_endpoint_tests SYSTEM PRIVATE gtest)
 
     add_celix_container(pstm_deadlock_tcp_test
             USE_CONFIG #ensures that a config.properties will be created with the launch bundles.
@@ -300,8 +300,8 @@ if (BUILD_PUBSUB_PSA_TCP)
     add_dependencies(pstm_deadlock_tcp_test pubsub_deadlock_sut_bundle)
 
     #Framework "bundle" has no cache dir. Default as "cache dir" the cwd is used.
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_src/META-INF/descriptors/msg.descriptor COPYONLY)
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_src/META-INF/topics/pub/deadlock.properties COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_gtest/META-INF/descriptors/msg.descriptor COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_gtest/META-INF/topics/pub/deadlock.properties COPYONLY)
 
     add_test(NAME pstm_deadlock_tcp_test COMMAND pstm_deadlock_tcp_test WORKING_DIRECTORY $<TARGET_PROPERTY:pstm_deadlock_tcp_test,CONTAINER_LOC>)
     setup_target_for_coverage(pstm_deadlock_tcp_test SCAN_DIR ..)
@@ -333,7 +333,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_serializer
             )
     target_link_libraries(pubsub_tcp_v2_wire_v1_tests PRIVATE Celix::pubsub_api Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_v2_wire_v1_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_v2_wire_v1_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_tcp_v2_wire_v1_tests COMMAND pubsub_tcp_v2_wire_v1_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_tcp_v2_wire_v1_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_tcp_v2_wire_v1_tests SCAN_DIR ..)
 
@@ -356,7 +356,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_serializer
             )
     target_link_libraries(pubsub_tcp_v2_wire_v2_tests PRIVATE Celix::pubsub_api Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_v2_wire_v2_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_v2_wire_v2_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_tcp_v2_wire_v2_tests COMMAND pubsub_tcp_v2_wire_v2_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_tcp_v2_wire_v2_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_tcp_v2_wire_v2_tests SCAN_DIR ..)
 
@@ -380,7 +380,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_serializer
             )
     target_link_libraries(pubsub_tcp_v2_wire_v2_with_no_scope_tests PRIVATE Celix::pubsub_api Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_v2_wire_v2_with_no_scope_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_v2_wire_v2_with_no_scope_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_tcp_v2_wire_v2_with_no_scope_tests COMMAND pubsub_tcp_v2_wire_v2_with_no_scope_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_tcp_v2_wire_v2_with_no_scope_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_tcp_v2_wire_v2_with_no_scope_tests SCAN_DIR ..)
 
@@ -404,7 +404,7 @@ if (BUILD_PUBSUB_PSA_TCP)
             pubsub_serializer
             )
     target_link_libraries(pubsub_tcp_v2_endpoint_tests PRIVATE Celix::pubsub_api Celix::dfi GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_tcp_v2_endpoint_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_tcp_v2_endpoint_tests SYSTEM PRIVATE gtest)
 
     add_celix_container(pstm_deadlock_tcp_v2_test
             USE_CONFIG #ensures that a config.properties will be created with the launch bundles.
@@ -430,8 +430,8 @@ if (BUILD_PUBSUB_PSA_TCP)
     add_dependencies(pstm_deadlock_tcp_v2_test pubsub_deadlock_sut_bundle)
 
     #Framework "bundle" has no cache dir. Default as "cache dir" the cwd is used.
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_src/META-INF/descriptors/msg.descriptor COPYONLY)
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_src/META-INF/topics/pub/deadlock.properties COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_gtest/META-INF/descriptors/msg.descriptor COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_tcp_gtest/META-INF/topics/pub/deadlock.properties COPYONLY)
 
     add_test(NAME pstm_deadlock_tcp_v2_test COMMAND pstm_deadlock_tcp_v2_test WORKING_DIRECTORY $<TARGET_PROPERTY:pstm_deadlock_tcp_v2_test,CONTAINER_LOC>)
     setup_target_for_coverage(pstm_deadlock_tcp_v2_test SCAN_DIR ..)
@@ -462,7 +462,7 @@ if (BUILD_PUBSUB_PSA_WS)
             pubsub_tst
             )
     target_link_libraries(pubsub_websocket_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi civetweb_shared GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_websocket_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_websocket_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_websocket_tests COMMAND pubsub_websocket_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_websocket_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_websocket_tests SCAN_DIR ..)
 
@@ -489,8 +489,8 @@ if (BUILD_PUBSUB_PSA_WS)
     add_dependencies(pstm_deadlock_websocket_test pubsub_deadlock_sut_bundle)
 
     #Framework "bundle" has no cache dir. Default as "cache dir" the cwd is used.
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_src/META-INF/descriptors/msg.descriptor COPYONLY)
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_src/META-INF/topics/pub/deadlock.properties COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_gtest/META-INF/descriptors/msg.descriptor COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_gtest/META-INF/topics/pub/deadlock.properties COPYONLY)
 
     add_test(NAME pstm_deadlock_websocket_test COMMAND pstm_deadlock_websocket_test WORKING_DIRECTORY $<TARGET_PROPERTY:pstm_deadlock_websocket_test,CONTAINER_LOC>)
     setup_target_for_coverage(pstm_deadlock_websocket_test SCAN_DIR ..)
@@ -514,7 +514,7 @@ if (BUILD_PUBSUB_PSA_WS)
             pubsub_serializer
             )
     target_link_libraries(pubsub_websocket_v2_tests PRIVATE Celix::pubsub_api Jansson civetweb_shared GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_websocket_v2_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_websocket_v2_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_websocket_v2_tests COMMAND pubsub_websocket_v2_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_websocket_v2_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_websocket_v2_tests SCAN_DIR ..)
 
@@ -541,8 +541,8 @@ if (BUILD_PUBSUB_PSA_WS)
     add_dependencies(pstm_deadlock_websocket_v2_test pubsub_deadlock_sut_bundle)
 
     #Framework "bundle" has no cache dir. Default as "cache dir" the cwd is used.
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_v2_src/META-INF/descriptors/msg.descriptor COPYONLY)
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_v2_src/META-INF/topics/pub/deadlock.properties COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_v2_gtest/META-INF/descriptors/msg.descriptor COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_websocket_v2_gtest/META-INF/topics/pub/deadlock.properties COPYONLY)
 
     add_test(NAME pstm_deadlock_websocket_v2_test COMMAND pstm_deadlock_websocket_v2_test WORKING_DIRECTORY $<TARGET_PROPERTY:pstm_deadlock_websocket_v2_test,CONTAINER_LOC>)
     setup_target_for_coverage(pstm_deadlock_websocket_v2_test SCAN_DIR ..)
@@ -587,12 +587,12 @@ if (BUILD_PUBSUB_PSA_ZMQ)
             )
 
     target_link_libraries(pubsub_zmq_tests PRIVATE Celix::pubsub_api Celix::dfi ZMQ::lib CZMQ::lib GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_zmq_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_zmq_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_zmq_tests COMMAND pubsub_zmq_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_zmq_tests SCAN_DIR ..)
 
     target_link_libraries(pubsub_zmq_v2_tests PRIVATE Celix::pubsub_api Celix::dfi ZMQ::lib CZMQ::lib GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_zmq_v2_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_zmq_v2_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_zmq_v2_tests COMMAND pubsub_zmq_v2_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_v2_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_zmq_v2_tests SCAN_DIR ..)
 
@@ -614,7 +614,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
         )
 
     target_link_libraries(pubsub_zmq_wire_v2_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi ZMQ::lib CZMQ::lib GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_zmq_wire_v2_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_zmq_wire_v2_tests SYSTEM PRIVATE gtest)
     add_test(NAME pubsub_zmq_wire_v2_tests COMMAND pubsub_zmq_wire_v2_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_wire_v2_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_zmq_wire_v2_tests SCAN_DIR ..)
 
@@ -659,13 +659,13 @@ if (BUILD_PUBSUB_PSA_ZMQ)
                 pubsub_serializer
             )
     target_link_libraries(pubsub_zmq_zerocopy_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi ZMQ::lib CZMQ::lib GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_zmq_zerocopy_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_zmq_zerocopy_tests SYSTEM PRIVATE gtest)
 
     add_test(NAME pubsub_zmq_zerocopy_tests COMMAND pubsub_zmq_zerocopy_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_zerocopy_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_zmq_zerocopy_tests SCAN_DIR ..)
 
     target_link_libraries(pubsub_zmq_v2_zerocopy_tests PRIVATE Celix::pubsub_api Celix::dfi ZMQ::lib CZMQ::lib GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_zmq_v2_zerocopy_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_zmq_v2_zerocopy_tests SYSTEM PRIVATE gtest)
 
     add_test(NAME pubsub_zmq_v2_zerocopy_tests COMMAND pubsub_zmq_v2_zerocopy_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_v2_zerocopy_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_zmq_v2_zerocopy_tests SCAN_DIR ..)
@@ -690,7 +690,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
         pubsub_serializer
         )
     target_link_libraries(pubsub_zmq_zerocopy_wire_v2_tests PRIVATE Celix::pubsub_api Jansson Celix::dfi ZMQ::lib CZMQ::lib GTest::gtest GTest::gtest_main)
-    target_include_directories(pubsub_zmq_zerocopy_wire_v2_tests SYSTEM PRIVATE src)
+    target_include_directories(pubsub_zmq_zerocopy_wire_v2_tests SYSTEM PRIVATE gtest)
 
     add_test(NAME pubsub_zmq_zerocopy_wire_v2_tests COMMAND pubsub_zmq_zerocopy_wire_v2_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_zerocopy_wire_v2_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_zmq_zerocopy_wire_v2_tests SCAN_DIR ..)
@@ -733,8 +733,8 @@ if (BUILD_PUBSUB_PSA_ZMQ)
     add_dependencies(pstm_deadlock_zmq_test pubsub_deadlock_sut_bundle)
 
     #Framework "bundle" has no cache dir. Default as "cache dir" the cwd is used.
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_src/META-INF/descriptors/msg.descriptor COPYONLY)
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_src/META-INF/topics/pub/deadlock.properties COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_gtest/META-INF/descriptors/msg.descriptor COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_gtest/META-INF/topics/pub/deadlock.properties COPYONLY)
 
     add_test(NAME pstm_deadlock_zmq_test COMMAND pstm_deadlock_zmq_test WORKING_DIRECTORY $<TARGET_PROPERTY:pstm_deadlock_zmq_test,CONTAINER_LOC>)
     setup_target_for_coverage(pstm_deadlock_zmq_test SCAN_DIR ..)
@@ -747,8 +747,8 @@ if (BUILD_PUBSUB_PSA_ZMQ)
     add_dependencies(pstm_deadlock_zmq_v2_test pubsub_deadlock_sut_bundle)
 
     #Framework "bundle" has no cache dir. Default as "cache dir" the cwd is used.
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_v2_src/META-INF/descriptors/msg.descriptor COPYONLY)
-    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_v2_src/META-INF/topics/pub/deadlock.properties COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/msg.descriptor ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_v2_gtest/META-INF/descriptors/msg.descriptor COPYONLY)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/meta_data/deadlock.scope.properties ${CMAKE_CURRENT_BINARY_DIR}/pstm_deadlock_zmq_v2_gtest/META-INF/topics/pub/deadlock.properties COPYONLY)
 
     add_test(NAME pstm_deadlock_zmq_v2_test COMMAND pstm_deadlock_zmq_v2_test WORKING_DIRECTORY $<TARGET_PROPERTY:pstm_deadlock_zmq_v2_test,CONTAINER_LOC>)
     setup_target_for_coverage(pstm_deadlock_zmq_v2_test SCAN_DIR ..)
@@ -800,7 +800,7 @@ function(add_celix_interceptors_test_for_psa_and_wire)
         gtest/PubSubInterceptorTestSuite.cc
     )
     target_link_libraries(${TEST_TARGET_NAME} PRIVATE Celix::framework Celix::pubsub_api GTest::gtest GTest::gtest_main Celix::pubsub_spi)
-    target_include_directories(${TEST_TARGET_NAME} PRIVATE src)
+    target_include_directories(${TEST_TARGET_NAME} PRIVATE gtest)
     add_test(NAME ${TEST_TARGET_NAME} COMMAND ${TEST_TARGET_NAME})
     setup_target_for_coverage(${TEST_TARGET_NAME} SCAN_DIR ..)
 
diff --git a/bundles/pubsub/integration/src/loopback_activator.c b/bundles/pubsub/integration/gtest/loopback_activator.c
similarity index 100%
rename from bundles/pubsub/integration/src/loopback_activator.c
rename to bundles/pubsub/integration/gtest/loopback_activator.c
diff --git a/bundles/pubsub/integration/src/msg.h b/bundles/pubsub/integration/gtest/msg.h
similarity index 100%
rename from bundles/pubsub/integration/src/msg.h
rename to bundles/pubsub/integration/gtest/msg.h
diff --git a/bundles/pubsub/integration/src/receive_count_service.h b/bundles/pubsub/integration/gtest/receive_count_service.h
similarity index 100%
rename from bundles/pubsub/integration/src/receive_count_service.h
rename to bundles/pubsub/integration/gtest/receive_count_service.h
diff --git a/bundles/pubsub/integration/src/serializer_activator.cc b/bundles/pubsub/integration/gtest/serializer_activator.cc
similarity index 100%
rename from bundles/pubsub/integration/src/serializer_activator.cc
rename to bundles/pubsub/integration/gtest/serializer_activator.cc
diff --git a/bundles/pubsub/integration/src/sut_activator.c b/bundles/pubsub/integration/gtest/sut_activator.c
similarity index 100%
rename from bundles/pubsub/integration/src/sut_activator.c
rename to bundles/pubsub/integration/gtest/sut_activator.c
diff --git a/bundles/pubsub/integration/src/sut_endpoint_activator.c b/bundles/pubsub/integration/gtest/sut_endpoint_activator.c
similarity index 100%
rename from bundles/pubsub/integration/src/sut_endpoint_activator.c
rename to bundles/pubsub/integration/gtest/sut_endpoint_activator.c
diff --git a/bundles/pubsub/integration/src/tst_activator.c b/bundles/pubsub/integration/gtest/tst_activator.c
similarity index 100%
rename from bundles/pubsub/integration/src/tst_activator.c
rename to bundles/pubsub/integration/gtest/tst_activator.c
diff --git a/bundles/pubsub/integration/src/tst_endpoint_activator.c b/bundles/pubsub/integration/gtest/tst_endpoint_activator.c
similarity index 100%
rename from bundles/pubsub/integration/src/tst_endpoint_activator.c
rename to bundles/pubsub/integration/gtest/tst_endpoint_activator.c

[celix] 01/02: Refactors setting the C++ standard, because osx has issues building with the prev setup.

Posted by pn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch feature/pubsub-interceptor-fix
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 7ec75a7f31cedd5285a8b8c2d4c3cc9584b28231
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Tue Jul 27 19:50:09 2021 +0200

    Refactors setting the C++ standard, because osx has issues building with the prev setup.
---
 CMakeLists.txt                                                        | 3 ++-
 bundles/cxx_remote_services/admin/CMakeLists.txt                      | 1 -
 bundles/cxx_remote_services/admin/gtest/CMakeLists.txt                | 1 -
 bundles/cxx_remote_services/discovery_configured/CMakeLists.txt       | 1 -
 bundles/cxx_remote_services/discovery_configured/gtest/CMakeLists.txt | 2 --
 bundles/cxx_remote_services/integration/CMakeLists.txt                | 4 ----
 bundles/cxx_remote_services/integration/gtest/CMakeLists.txt          | 1 -
 bundles/cxx_remote_services/rsa_spi/CMakeLists.txt                    | 2 --
 bundles/cxx_remote_services/topology_manager/CMakeLists.txt           | 3 +--
 bundles/pubsub/pubsub_serializer_avrobin/gtest/CMakeLists.txt         | 1 -
 bundles/pubsub/pubsub_serializer_json/gtest/CMakeLists.txt            | 1 -
 bundles/pubsub/pubsub_spi/gtest/CMakeLists.txt                        | 1 -
 bundles/pubsub/pubsub_utils/gtest/CMakeLists.txt                      | 1 -
 bundles/shell/shell/CMakeLists.txt                                    | 1 +
 examples/CMakeLists.txt                                               | 2 +-
 libs/framework/CMakeLists.txt                                         | 2 ++
 libs/promises/CMakeLists.txt                                          | 2 --
 libs/promises/gtest/CMakeLists.txt                                    | 1 -
 18 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5bb18cc..88ec2f6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,7 +48,8 @@ set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -fPIC ${CMAKE_C_FLAGS}")
 set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
 
 # Set C++ specific flags
-set(CMAKE_CXX_FLAGS "-std=c++11 -fno-rtti ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_STANDARD 17) #test code and newer C++ bundles can be C++17. The Celix::framework and Celix::CxxShell is still C++11
+set(CMAKE_CXX_FLAGS "-fno-rtti ${CMAKE_CXX_FLAGS}")
 set(CMAKE_CXX_FLAGS "-Wall -Werror -Wextra -Weffc++ ${CMAKE_CXX_FLAGS}")
 
 if(APPLE)
diff --git a/bundles/cxx_remote_services/admin/CMakeLists.txt b/bundles/cxx_remote_services/admin/CMakeLists.txt
index 24b77ab..4271651 100644
--- a/bundles/cxx_remote_services/admin/CMakeLists.txt
+++ b/bundles/cxx_remote_services/admin/CMakeLists.txt
@@ -30,7 +30,6 @@ target_link_libraries(RemoteServiceAdmin PRIVATE
         Celix::framework
         Celix::log_helper
 )
-target_compile_options(RemoteServiceAdmin PRIVATE -std=c++17)
 
 install_celix_bundle(RemoteServiceAdmin EXPORT celix COMPONENT rsa)
 #Setup target aliases to match external usage
diff --git a/bundles/cxx_remote_services/admin/gtest/CMakeLists.txt b/bundles/cxx_remote_services/admin/gtest/CMakeLists.txt
index 878a555..0fe109d 100644
--- a/bundles/cxx_remote_services/admin/gtest/CMakeLists.txt
+++ b/bundles/cxx_remote_services/admin/gtest/CMakeLists.txt
@@ -19,7 +19,6 @@ add_executable(test_cxx_remote_service_admin
     src/RemoteServiceAdminTestSuite.cc
 )
 target_link_libraries(test_cxx_remote_service_admin PRIVATE Celix::framework GTest::gtest GTest::gtest_main Celix::rsa_spi)
-target_compile_options(test_cxx_remote_service_admin PRIVATE -std=c++17)
 
 add_dependencies(test_cxx_remote_service_admin RemoteServiceAdmin_bundle)
 
diff --git a/bundles/cxx_remote_services/discovery_configured/CMakeLists.txt b/bundles/cxx_remote_services/discovery_configured/CMakeLists.txt
index 49f31dd..7834cce 100644
--- a/bundles/cxx_remote_services/discovery_configured/CMakeLists.txt
+++ b/bundles/cxx_remote_services/discovery_configured/CMakeLists.txt
@@ -41,7 +41,6 @@ target_link_libraries(RsaConfiguredDiscovery PRIVATE
         Celix::log_helper
 )
 target_include_directories(RsaConfiguredDiscovery PRIVATE src)
-target_compile_options(RsaConfiguredDiscovery PRIVATE -std=c++17)
 install_celix_bundle(RsaConfiguredDiscovery EXPORT celix COMPONENT rsa)
 add_library(Celix::RsaConfiguredDiscovery ALIAS RsaConfiguredDiscovery)
 
diff --git a/bundles/cxx_remote_services/discovery_configured/gtest/CMakeLists.txt b/bundles/cxx_remote_services/discovery_configured/gtest/CMakeLists.txt
index 8e197fe..710440b 100644
--- a/bundles/cxx_remote_services/discovery_configured/gtest/CMakeLists.txt
+++ b/bundles/cxx_remote_services/discovery_configured/gtest/CMakeLists.txt
@@ -20,8 +20,6 @@ add_executable(test_cxx_rsa_configured_discovery
 )
 
 target_link_libraries(test_cxx_rsa_configured_discovery PRIVATE Celix::framework GTest::gtest GTest::gtest_main Celix::rsa_spi RsaConfiguredDiscovery_api)
-target_compile_options(test_cxx_rsa_configured_discovery PRIVATE -std=c++17)
-
 
 add_dependencies(test_cxx_rsa_configured_discovery RsaConfiguredDiscovery_bundle)
 celix_get_bundle_file(RsaConfiguredDiscovery RSA_CONFIGURED_DISCOVERY_BUNDLE_LOCATION)
diff --git a/bundles/cxx_remote_services/integration/CMakeLists.txt b/bundles/cxx_remote_services/integration/CMakeLists.txt
index 860a081..8321f00 100644
--- a/bundles/cxx_remote_services/integration/CMakeLists.txt
+++ b/bundles/cxx_remote_services/integration/CMakeLists.txt
@@ -19,7 +19,6 @@ add_celix_bundle(TestExportImportRemoteServiceFactory
         SOURCES src/TestExportImportRemoteServiceFactory.cc
 )
 target_link_libraries(TestExportImportRemoteServiceFactory PRIVATE Celix::rsa_spi Celix::pubsub_api Celix::Promises Celix::log_helper)
-target_compile_options(TestExportImportRemoteServiceFactory PRIVATE -std=c++17) #TODO how can this be improved (bring back -std=c++17 on INTERFACE for promises?
 target_include_directories(TestExportImportRemoteServiceFactory PRIVATE include)
 celix_bundle_files(TestExportImportRemoteServiceFactory
         resources/Calculator$add$Invoke.descriptor
@@ -32,8 +31,6 @@ add_celix_bundle(CalculatorProvider
 )
 target_link_libraries(CalculatorProvider PRIVATE Celix::Promises)
 target_include_directories(CalculatorProvider PRIVATE include)
-target_compile_options(CalculatorProvider PRIVATE -std=c++17) #TODO how can this be improved (bring back -std=c++17 on INTERFACE for promises?
-
 
 add_celix_bundle(CalculatorConsumer
         SOURCES src/CalculatorConsumer.cc
@@ -41,7 +38,6 @@ add_celix_bundle(CalculatorConsumer
 celix_bundle_files(CalculatorConsumer ${CMAKE_CURRENT_SOURCE_DIR}/resources/endpoint_discovery.json DESTINATION "META-INF/discovery") # add configured discovery as resource in the bundle.
 target_link_libraries(CalculatorConsumer PRIVATE Celix::Promises Celix::shell_api Celix::RsaConfiguredDiscovery_api)
 target_include_directories(CalculatorConsumer PRIVATE include)
-target_compile_options(CalculatorConsumer PRIVATE -std=c++17) #TODO how can this be improved (bring back -std=c++17 on INTERFACE for promises?
 
 if (ENABLE_TESTING)
     add_subdirectory(gtest)
diff --git a/bundles/cxx_remote_services/integration/gtest/CMakeLists.txt b/bundles/cxx_remote_services/integration/gtest/CMakeLists.txt
index 81386b9..d6a66e9 100644
--- a/bundles/cxx_remote_services/integration/gtest/CMakeLists.txt
+++ b/bundles/cxx_remote_services/integration/gtest/CMakeLists.txt
@@ -19,7 +19,6 @@ add_executable(test_cxx_remote_services_integration
     src/RemoteServicesIntegrationTestSuite.cc
 )
 target_link_libraries(test_cxx_remote_services_integration PRIVATE Celix::framework Celix::Promises Celix::shell_api ZMQ::lib CZMQ::lib GTest::gtest GTest::gtest_main)
-target_compile_options(test_cxx_remote_services_integration PRIVATE -std=c++17)
 target_include_directories(test_cxx_remote_services_integration PRIVATE ../include) #Add ICalculator
 
 add_celix_bundle_dependencies(test_cxx_remote_services_integration
diff --git a/bundles/cxx_remote_services/rsa_spi/CMakeLists.txt b/bundles/cxx_remote_services/rsa_spi/CMakeLists.txt
index 73e944b..968af6d 100644
--- a/bundles/cxx_remote_services/rsa_spi/CMakeLists.txt
+++ b/bundles/cxx_remote_services/rsa_spi/CMakeLists.txt
@@ -20,8 +20,6 @@ target_include_directories(rsa_spi INTERFACE
     $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
     $<INSTALL_INTERFACE:include/celix/rsa>
 )
-#TODO TBD is it smart to add a c++ std as INTERFACE option?
-#target_compile_options(rsa_spi INTERFACE -std=c++17)
 
 install(TARGETS rsa_spi EXPORT celix DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rsa)
 install(DIRECTORY include/ DESTINATION include/celix/rsa COMPONENT rsa)
diff --git a/bundles/cxx_remote_services/topology_manager/CMakeLists.txt b/bundles/cxx_remote_services/topology_manager/CMakeLists.txt
index 6056ad9..7459fa3 100644
--- a/bundles/cxx_remote_services/topology_manager/CMakeLists.txt
+++ b/bundles/cxx_remote_services/topology_manager/CMakeLists.txt
@@ -29,8 +29,7 @@ target_link_libraries(async_topology_manager PRIVATE
         Celix::async_rsa_discovery_configured
         Celix::framework
         Celix::log_helper
-        )
-target_compile_options(async_topology_manager INTERFACE -std=c++17)
+)
 
 #if (ENABLE_TESTING)
 #    add_subdirectory(gtest)
diff --git a/bundles/pubsub/pubsub_serializer_avrobin/gtest/CMakeLists.txt b/bundles/pubsub/pubsub_serializer_avrobin/gtest/CMakeLists.txt
index 59e4ca5..8f764d4 100644
--- a/bundles/pubsub/pubsub_serializer_avrobin/gtest/CMakeLists.txt
+++ b/bundles/pubsub/pubsub_serializer_avrobin/gtest/CMakeLists.txt
@@ -25,7 +25,6 @@ add_executable(test_pubsub_serializer_avrobin
         src/PubSubAvrobinSerializationProviderTestSuite.cc
 )
 target_link_libraries(test_pubsub_serializer_avrobin PRIVATE Celix::framework Celix::dfi Celix::pubsub_utils GTest::gtest GTest::gtest_main Celix::pubsub_spi)
-target_compile_options(test_pubsub_serializer_avrobin PRIVATE -std=c++14) #Note test code is allowed to be C++14
 
 add_dependencies(test_pubsub_serializer_avrobin celix_pubsub_serializer_avrobin_bundle pubsub_avrobin_serialization_descriptor_bundle)
 target_compile_definitions(test_pubsub_serializer_avrobin PRIVATE -DSERIALIZATION_BUNDLE=\"$<TARGET_PROPERTY:celix_pubsub_serializer_avrobin,BUNDLE_FILE>\")
diff --git a/bundles/pubsub/pubsub_serializer_json/gtest/CMakeLists.txt b/bundles/pubsub/pubsub_serializer_json/gtest/CMakeLists.txt
index 9a07c94..60b5626 100644
--- a/bundles/pubsub/pubsub_serializer_json/gtest/CMakeLists.txt
+++ b/bundles/pubsub/pubsub_serializer_json/gtest/CMakeLists.txt
@@ -25,7 +25,6 @@ add_executable(test_pubsub_serializer_json
 		src/PubSubJsonSerializationProviderTestSuite.cc
 )
 target_link_libraries(test_pubsub_serializer_json PRIVATE Celix::framework Celix::dfi Celix::pubsub_utils GTest::gtest GTest::gtest_main Celix::pubsub_spi)
-target_compile_options(test_pubsub_serializer_json PRIVATE -std=c++14) #Note test code is allowed to be C++14
 
 add_dependencies(test_pubsub_serializer_json celix_pubsub_serializer_json_bundle pubsub_json_serialization_descriptor_bundle)
 target_compile_definitions(test_pubsub_serializer_json PRIVATE -DSERIALIZATION_BUNDLE=\"$<TARGET_PROPERTY:celix_pubsub_serializer_json,BUNDLE_FILE>\")
diff --git a/bundles/pubsub/pubsub_spi/gtest/CMakeLists.txt b/bundles/pubsub/pubsub_spi/gtest/CMakeLists.txt
index 5cc80be..4c084bd 100644
--- a/bundles/pubsub/pubsub_spi/gtest/CMakeLists.txt
+++ b/bundles/pubsub/pubsub_spi/gtest/CMakeLists.txt
@@ -19,7 +19,6 @@ add_executable(test_pubsub_spi
 		src/PubSubEndpointUtilsTestSuite.cc
 )
 target_link_libraries(test_pubsub_spi PRIVATE Celix::pubsub_spi GTest::gtest GTest::gtest_main)
-target_compile_options(test_pubsub_spi PRIVATE -std=c++14) #Note test code is allowed to be C++14
 
 #Seems to be an issue with coverage setup, for now disabled
 #setup_target_for_coverage(test_pubsub_spi SCAN_DIR ..)
diff --git a/bundles/pubsub/pubsub_utils/gtest/CMakeLists.txt b/bundles/pubsub/pubsub_utils/gtest/CMakeLists.txt
index a883776..ac8cdb8 100644
--- a/bundles/pubsub/pubsub_utils/gtest/CMakeLists.txt
+++ b/bundles/pubsub/pubsub_utils/gtest/CMakeLists.txt
@@ -52,7 +52,6 @@ add_executable(test_pubsub_utils
 		src/PubSubMatchingTestSuite.cpp
 )
 target_link_libraries(test_pubsub_utils PRIVATE Celix::framework Celix::pubsub_utils GTest::gtest GTest::gtest_main Celix::pubsub_spi)
-target_compile_options(test_pubsub_utils PRIVATE -std=c++14) #Note test code is allowed to be C++14
 add_test(NAME test_pubsub_utils COMMAND test_pubsub_utils)
 setup_target_for_coverage(test_pubsub_utils SCAN_DIR ..)
 
diff --git a/bundles/shell/shell/CMakeLists.txt b/bundles/shell/shell/CMakeLists.txt
index c89e85a..ba62a4c 100644
--- a/bundles/shell/shell/CMakeLists.txt
+++ b/bundles/shell/shell/CMakeLists.txt
@@ -70,6 +70,7 @@ if (SHELL)
 	add_library(Celix::shell ALIAS shell)
 
 	if (CELIX_CXX)
+		set(CMAKE_CXX_STANDARD 11) #Note that the Celix::CxxShell uses C++11 only
 		add_celix_bundle(ShellCxx
 			SYMBOLIC_NAME "apache::celix::CxxShell"
 			VERSION "2.1.0"
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index d26439c..80b88e7 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -30,6 +30,6 @@
 cmake_minimum_required (VERSION 3.4)
 project (CelixUse C CXX)
 set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 ${CMAKE_C_FLAGS}")
-set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_STANDARD 11)
 find_package(Celix REQUIRED)
 add_subdirectory(celix-examples examples)
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index c430a4a..cfc1d22 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -19,6 +19,8 @@ find_package(ZLIB REQUIRED)
 find_package(UUID REQUIRED)
 find_package(CURL REQUIRED)
 
+set(CMAKE_CXX_STANDARD 11) #Note that the Celix framework C++ (header only) library uses C++11 only
+
 set(SOURCES
         src/attribute.c src/bundle.c src/bundle_archive.c src/bundle_cache.c
         src/bundle_context.c src/bundle_revision.c src/capability.c src/celix_errorcodes.c
diff --git a/libs/promises/CMakeLists.txt b/libs/promises/CMakeLists.txt
index 5c212f9..86784e3 100644
--- a/libs/promises/CMakeLists.txt
+++ b/libs/promises/CMakeLists.txt
@@ -28,7 +28,6 @@ if (NOT COMMAND celix_subproject)
 
     include(GNUInstallDirs)
 
-    set(CMAKE_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS}")
     set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_CXX_FLAGS_DEBUG}")
 
     set(PROMISES_STANDALONE ON)
@@ -49,7 +48,6 @@ if (PROMISES OR PROMISES_STANDALONE)
     add_library(Celix::Promises ALIAS Promises)
 
     add_executable(PromiseExamples src/PromiseExamples.cc)
-    target_compile_options(PromiseExamples PRIVATE -std=c++17)
     target_link_libraries(PromiseExamples PRIVATE Celix::Promises)
 
     if (ENABLE_TESTING AND NOT PROMISE_STANDALONE)
diff --git a/libs/promises/gtest/CMakeLists.txt b/libs/promises/gtest/CMakeLists.txt
index 38cfa8d..209e40d 100644
--- a/libs/promises/gtest/CMakeLists.txt
+++ b/libs/promises/gtest/CMakeLists.txt
@@ -20,7 +20,6 @@ add_executable(test_celix_promises
         src/PromisesTestSuite.cc
         src/VoidPromisesTestSuite.cc
 )
-target_compile_options(test_celix_promises PRIVATE -std=c++17)
 target_link_libraries(test_celix_promises PRIVATE GTest::gtest GTest::gtest_main Celix::Promises)
 
 add_test(NAME test_celix_promises COMMAND test_celix_promises)