From 2c2dd84bff0b8a097a5205d7ed9c2d50fd090034 Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 28 Jan 2023 01:04:35 +0100 Subject: [PATCH] enable all warnings and Werror --- .gitignore | 1 + src/CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 6824e28..7c329a2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .vscode/ out/ +build/ *.json *.nes diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 60823e2..40a4015 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -33,6 +33,12 @@ target_link_libraries(nesemu ${CMAKE_DL_LIBS} ) +if (WIN32) + target_compile_options(nesemu PRIVATE "/W4" "/WX") +else() + target_compile_options(nesemu PRIVATE "-Wall" "-Werror") +endif() + add_custom_command(TARGET nesemu POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/roms $/roms ) \ No newline at end of file