---
CMakeLists.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0581c9e..e3e0eec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -174,6 +174,18 @@ if( CMAKE_VERSION VERSION_LESS 3.1 AND ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_C
endif()
+# Warn about missing override specifiers, if supported
+if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
+ include(CheckCXXCompilerFlag)
+
+ CHECK_CXX_COMPILER_FLAG("-Wsuggest-override" COMPILER_SUPPORTS_WSUGGEST_OVERRIDE)
+
+ if(COMPILER_SUPPORTS_WSUGGEST_OVERRIDE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override")
+ endif()
+endif()
+
+
#================================================
# Set flags for GCC, or treat llvm as GCC
#================================================
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help : https://help.launchpad.net/ListHelp