Merge lp:~alan-griffiths/miral/fix-for-zesty-gtest into lp:miral

Proposed by Alan Griffiths
Status: Merged
Approved by: Gerry Boland
Approved revision: 459
Merged at revision: 458
Proposed branch: lp:~alan-griffiths/miral/fix-for-zesty-gtest
Merge into: lp:miral
Diff against target: 20 lines (+10/-0)
1 file modified
test/CMakeLists.txt (+10/-0)
To merge this branch: bzr merge lp:~alan-griffiths/miral/fix-for-zesty-gtest
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+312018@code.launchpad.net

Commit message

[tests] GTest relies on a gnu extension, so don't treat that extension as an error when compiling tests

To post a comment you must log in.
458. By Alan Griffiths

g++ treats all -pedantic warnings as one feature

459. By Alan Griffiths

g++ ignores clang command line flags

Revision history for this message
Gerry Boland (gerboland) wrote :

works on gcc

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'test/CMakeLists.txt'
--- test/CMakeLists.txt 2016-11-15 17:38:33 +0000
+++ test/CMakeLists.txt 2016-11-29 10:34:25 +0000
@@ -21,6 +21,16 @@
21 endif()21 endif()
22endif()22endif()
2323
24# We can't tell which version of gtest we're building against and INSTANTIATE_TEST_CASE_P changed in
25# a way that relies on a gcc extension to support backward-compatible code, So...
26check_cxx_compiler_flag(-Wno-gnu-zero-variadic-macro-arguments MIRAL_COMPILE_WITH_W_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS)
27check_cxx_compiler_flag(-Wno-pedantic MIRAL_COMPILE_WITH_W_NO_PEDANTIC)
28if ("${CMAKE_CXX_COMPILER}" MATCHES ".*clang.*" AND MIRAL_COMPILE_WITH_W_NO_GNU_ZERO_VARIADIC_MACRO_ARGUMENTS)
29 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments") # clang
30elseif(MIRAL_COMPILE_WITH_W_NO_PEDANTIC)
31 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pedantic") #gcc
32endif()
33
24include_directories(34include_directories(
25 ${MIRTEST_INCLUDE_DIRS}35 ${MIRTEST_INCLUDE_DIRS}
26 ${GMOCK_INCLUDE_DIR}36 ${GMOCK_INCLUDE_DIR}

Subscribers

People subscribed via source and target branches