Repository: qpid-proton Updated Branches: refs/heads/master ece7f4e48 -> 979ce2c45
PROTON-1220: add compiler flags for C examples Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/979ce2c4 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/979ce2c4 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/979ce2c4 Branch: refs/heads/master Commit: 979ce2c45d4d70e38c8485f71467b272d625023e Parents: ece7f4e Author: Ken Giusti <[email protected]> Authored: Wed Jun 1 10:56:41 2016 -0400 Committer: Ken Giusti <[email protected]> Committed: Thu Jun 2 11:38:44 2016 -0400 ---------------------------------------------------------------------- examples/c/messenger/CMakeLists.txt | 13 +++++++++++++ examples/c/reactor/CMakeLists.txt | 11 +++++++++++ proton-c/CMakeLists.txt | 5 ++++- 3 files changed, 28 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/979ce2c4/examples/c/messenger/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/examples/c/messenger/CMakeLists.txt b/examples/c/messenger/CMakeLists.txt index 1b32d0c..f7c5f81 100644 --- a/examples/c/messenger/CMakeLists.txt +++ b/examples/c/messenger/CMakeLists.txt @@ -19,6 +19,19 @@ find_package(Proton REQUIRED) +set (messenger-examples + recv.c + send.c + recv-async.c + send-async.c + ) + +set_source_files_properties ( + ${messenger-examples} + PROPERTIES + COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_LANGUAGE_FLAGS} ${LINK_TIME_OPTIMIZATION}" + ) + add_executable(recv recv.c) add_executable(send send.c) add_executable(recv-async recv-async.c) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/979ce2c4/examples/c/reactor/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/examples/c/reactor/CMakeLists.txt b/examples/c/reactor/CMakeLists.txt index 99e5b4a..9c96c0b 100644 --- a/examples/c/reactor/CMakeLists.txt +++ b/examples/c/reactor/CMakeLists.txt @@ -19,6 +19,17 @@ find_package(Proton REQUIRED) +set (reactor-examples + sender.c + receiver.c + ) + +set_source_files_properties ( + ${reactor-examples} + PROPERTIES + COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_LANGUAGE_FLAGS} ${LINK_TIME_OPTIMIZATION}" + ) + include_directories(${Proton_INCLUDE_DIRS}) add_executable(sender sender.c) add_executable(receiver receiver.c) http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/979ce2c4/proton-c/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt index afd4126..65dd94d 100644 --- a/proton-c/CMakeLists.txt +++ b/proton-c/CMakeLists.txt @@ -253,8 +253,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (CXX_WARNING_FLAGS "${WERROR} -pedantic -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-float-equal -Wno-padded -Wno-sign-conversion -Wno-switch-enum -Wno-weak-vtables -Wno-exit-time-destructors -Wno-global-constructors -Wno-shorten-64-to-32 -Wno-documentation -Wno-documentation-unknown-command -Wno-old-style-cast -Wno-missing-noreturn") endif() -# Make CXX_WARNING_FLAGS visible to examples. +# Make flags visible to examples. set(CXX_WARNING_FLAGS "${CXX_WARNING_FLAGS}" PARENT_SCOPE) +set(COMPILE_WARNING_FLAGS "${COMPILE_WARNING_FLAGS}" PARENT_SCOPE) +set(COMPILE_LANGUAGE_FLAGS "${COMPILE_LANGUAGE_FLAGS}" PARENT_SCOPE) +set(LINK_TIME_OPTIMIZATION "${LTO}" PARENT_SCOPE) if (MSVC) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
