diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 0eee8db640..94519e93f2 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -377,7 +377,7 @@ jobs: cd build echo "::group::CMake" - cmake .. -G"MSYS Makefiles" + cmake .. -DOPTION_NO_WARN_UNINIT=1 -G"MSYS Makefiles" echo "::endgroup::" echo "::group::Build" diff --git a/cmake/CompileFlags.cmake b/cmake/CompileFlags.cmake index 56d9c475b0..fc4d21de70 100644 --- a/cmake/CompileFlags.cmake +++ b/cmake/CompileFlags.cmake @@ -158,6 +158,10 @@ macro(compile_flags) endif() endif() endif() + + if (OPTION_NO_WARN_UNINIT) + add_compile_options(-Wno-maybe-uninitialized -Wno-uninitialized) + endif (OPTION_NO_WARN_UNINIT) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel") add_compile_options( -Wall