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/05/07 07:10:12 UTC

[celix] 02/02: Removes setting std=c++17 compiler option as INTERFACE on the promises lib.

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

pnoltes pushed a commit to branch hotfix/do_not_set_cxx_std
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 9caa3b31ce7c5930031c7ce094e2eb7fde3ad255
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Fri May 7 09:07:06 2021 +0200

    Removes setting std=c++17 compiler option as INTERFACE on the promises lib.
---
 libs/promises/CMakeLists.txt       | 2 +-
 libs/promises/gtest/CMakeLists.txt | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libs/promises/CMakeLists.txt b/libs/promises/CMakeLists.txt
index 61342f8..5c212f9 100644
--- a/libs/promises/CMakeLists.txt
+++ b/libs/promises/CMakeLists.txt
@@ -46,10 +46,10 @@ if (PROMISES OR PROMISES_STANDALONE)
         $<INSTALL_INTERFACE:include/celix/promises>
     )
     target_link_libraries(Promises INTERFACE Threads::Threads)
-    target_compile_options(Promises INTERFACE -std=c++17)
     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 209e40d..38cfa8d 100644
--- a/libs/promises/gtest/CMakeLists.txt
+++ b/libs/promises/gtest/CMakeLists.txt
@@ -20,6 +20,7 @@ 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)