diff --git a/CMakeLists.txt b/CMakeLists.txt index c9529d1562..5ecba94852 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,11 @@ else() add_compile_options(-fdiagnostics-color) endif() + check_cxx_compiler_flag(-Wno-maybe-uninitialized flag_no_maybe_uninit) + if (flag_no_maybe_uninit) + add_compile_options(-Wno-maybe-uninitialized) + endif() + if(NOT NINJA_FORCE_PSELECT) # Check whether ppoll() is usable on the target platform. # Set -DUSE_PPOLL=1 if this is the case. @@ -255,6 +260,8 @@ if(BUILD_TESTING) endif() endif() + + # Tests all build into ninja_test executable. add_executable(ninja_test src/build_log_test.cc