Skip to content

Commit

Permalink
cmake: Add -Wno-c++98-compat if building for C++11.
Browse files Browse the repository at this point in the history
On clang, this is default on, and with C++11 we use override, which
is not C++98 compatible.
  • Loading branch information
martiert committed Jan 15, 2014
1 parent 7a953f1 commit 4f1edea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/Modules/CppUTestWarningFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,14 @@ else (MSVC)
Wno-weak-vtables
)


check_and_append_c_warning_flags(${WARNING_C_FLAGS})
check_and_append_c_warning_flags(${WARNING_C_ONLY_FLAGS})
check_and_append_cxx_warning_flags(${WARNING_CXX_FLAGS})

if (C++11)
check_cxx_compiler_flag("-Wno-c++98-compat" NO_WARNING_CXX_98_COMPAT_FLAG)
if (NO_WARNING_CXX_98_COMPAT_FLAG)
set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-c++98-compat")
endif (NO_WARNING_CXX_98_COMPAT_FLAG)
endif (C++11)
endif (MSVC)

0 comments on commit 4f1edea

Please sign in to comment.