configure_file(gmxpre-config.h.cmakein gmxpre-config.h)
configure_file(buildinfo.h.cmakein buildinfo.h ESCAPE_QUOTES)
+####
+set(IGNORED_CLANG_ALL_WARNINGS
+ "-Wno-c++98-compat -Wno-c++98-compat-pedantic" #No intention of C++98 compability
+ "-Wno-source-uses-openmp" #Don't warn for no-omp build
+ "-Wno-c++17-extensions" #Allowed in attributes (compilers are required to ignore unknown attributes)
+ "-Wno-documentation-unknown-command" #Custom commands are used
+ "-Wno-covered-switch-default" #GCC gives maybe-uninitialized without default label and checks for illegal enum values.
+ "-Wno-switch-enum" # default statement for enum is OK
+
+ #Following ones are undecided/TODO
+ "-Wno-disabled-macro-expansion"
+ "-Wno-cast-align"
+ "-Wno-reserved-id-macro"
+ "-Wno-global-constructors"
+ "-Wno-exit-time-destructors"
+ "-Wno-unused-macros"
+ "-Wno-weak-vtables"
+ "-Wno-conditional-uninitialized"
+ "-Wno-format-nonliteral"
+ "-Wno-shadow"
+ "-Wno-cast-qual"
+ "-Wno-documentation"
+ "-Wno-used-but-marked-unused"
+ "-Wno-padded"
+ "-Wno-float-equal"
+ "-Wno-old-style-cast"
+ "-Wno-conversion"
+ "-Wno-double-promotion")
+string(REPLACE " " ";" IGNORED_CLANG_ALL_WARNINGS "${IGNORED_CLANG_ALL_WARNINGS}")
+
+if (GMX_CLANG_TIDY)
+ set(CLANG_TIDY "clang-tidy" CACHE STRING "Name of clang-tidy executable")
+ find_program(CLANG_TIDY_EXE NAMES "${CLANG_TIDY}"
+ DOC "Path to clang-tidy executable")
+ if(NOT CLANG_TIDY_EXE)
+ message(FATAL_ERROR "clang-tidy not found.")
+ endif()
+ if(CMAKE_VERSION VERSION_LESS "3.6")
+ message(FATAL_ERROR "clang-tidy support requires cmake 3.6.")
+ endif()
+endif()
+#####
+
if (BUILD_TESTING)
if(NOT GMX_DEVELOPER_BUILD)
set(UNITTEST_TARGET_OPTIONS EXCLUDE_FROM_ALL)