# 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(...)))
#
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()