From: Mathias Preiner Date: Sat, 22 Sep 2018 06:26:56 +0000 (-0700) Subject: cmake: Enable -Wall. X-Git-Tag: cvc5-1.0.0~4527 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eada65a37e18bea23e3cbf584f47f72859cc69f9;p=cvc5.git cmake: Enable -Wall. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b733b65d1..ad6adf2e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,11 +148,16 @@ include(Config${CMAKE_BUILD_TYPE}) # Compiler flags add_check_c_cxx_flag("-O${OPTIMIZATION_LEVEL}") +add_check_c_cxx_flag("-Wall") add_check_c_flag("-fexceptions") add_check_c_cxx_flag("-Wno-deprecated") add_check_cxx_flag("-Wsuggest-override") add_check_cxx_flag("-Wnon-virtual-dtor") +# Temporarily disable -Wclass-memaccess to suppress 'no trivial copy-assignment' +# cdlist.h warnings. Remove when fixed. +add_check_cxx_flag("-Wno-class-memaccess") + #-----------------------------------------------------------------------------# # Option defaults (three-valued options (cvc4_option(...))) # diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt index 6cde56c62..d7491f8ca 100644 --- a/src/parser/CMakeLists.txt +++ b/src/parser/CMakeLists.txt @@ -82,6 +82,10 @@ foreach(lang Cvc Smt1 Smt2 Tptp) set_source_files_properties(${gen_src_files} PROPERTIES LANGUAGE CXX) set_source_files_properties(${gen_src_files} PROPERTIES GENERATED TRUE) + # We don't want to enable -Wall for code generated by ANTLR. + set_source_files_properties( + ${gen_src_files} PROPERTIES COMPILE_FLAGS -Wno-all) + # Add generated source files to the parser source files list(APPEND libcvc4parser_src_files ${gen_src_files}) endforeach()