Repository: qpid-cpp Updated Branches: refs/heads/master 9f823d4df -> 800028f4f
QPID-7360: Only add the option for gcc to avoid a build fail on windows Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/800028f4 Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/800028f4 Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/800028f4 Branch: refs/heads/master Commit: 800028f4f6d362a2b76ef575ce72981b07c72282 Parents: 9f823d4 Author: Justin Ross <[email protected]> Authored: Thu Apr 19 18:10:57 2018 -0700 Committer: Justin Ross <[email protected]> Committed: Thu Apr 19 18:10:57 2018 -0700 ---------------------------------------------------------------------- src/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/800028f4/src/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f7e69ea..82141ef 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -151,10 +151,12 @@ if (VALGRIND_FOUND) option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON) endif (VALGRIND_FOUND) -option(ENABLE_WARNING_ERROR "Consider compiler warnings to be errors" ON) -if (ENABLE_WARNING_ERROR) - set(WARNING_FLAGS "${WARNING_FLAGS} -Werror") -endif (ENABLE_WARNING_ERROR) +if (CMAKE_CXX_COMPILER_ID STREQUAL GNU) + option(ENABLE_WARNING_ERROR "Consider compiler warnings to be errors" ON) + if (ENABLE_WARNING_ERROR) + set(WARNING_FLAGS "${WARNING_FLAGS} -Werror") + endif (ENABLE_WARNING_ERROR) +endif (CMAKE_CXX_COMPILER_ID STREQUAL GNU) if (GCC_VERSION AND NOT GCC_VERSION VERSION_LESS 5.1) option(ENABLE_GLIBCXX_OLD_ABI "Enable old (pre GCC 5.1) C++ ABI" OFF) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
