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

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


The following commit(s) were added to refs/heads/main by this push:
     new ae6c741  PROTON-2389 Add COMPILE_FLAGS for test_main.cpp (#316)
ae6c741 is described below

commit ae6c741e3377787ec725fd6e6ebe0aedfcb1e110
Author: Jiri Daněk <jda...@redhat.com>
AuthorDate: Wed May 26 07:38:27 2021 +0200

    PROTON-2389 Add COMPILE_FLAGS for test_main.cpp (#316)
    
    This is needed on RHEL 7, which defaults to -std=c++03, causing compilation 
failure.
---
 c/tests/CMakeLists.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/c/tests/CMakeLists.txt b/c/tests/CMakeLists.txt
index fb7f00a..274744e 100644
--- a/c/tests/CMakeLists.txt
+++ b/c/tests/CMakeLists.txt
@@ -39,6 +39,8 @@ endif()
 if (CMAKE_CXX_COMPILER)
 
   add_library(test_main OBJECT test_main.cpp)
+  set_target_properties(test_main PROPERTIES
+    COMPILE_FLAGS "${CXX_STANDARD} ${CMAKE_CXX_FLAGS} ${CXX_WARNING_FLAGS} 
${LTO}")
 
   macro(add_c_test exe)
     add_executable(${exe} $<TARGET_OBJECTS:test_main> pn_test.cpp ${ARGN})

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

Reply via email to