From c4c88197db519ddf78d8103a71287f93617dcb09 Mon Sep 17 00:00:00 2001 From: FintasticMan Date: Sun, 29 Dec 2024 00:24:58 +0000 Subject: [PATCH] [Examples/*] Don't error on missing-braces warning GCC throws this warning. It's not an issue, but fixing it properly will probably need API changes, so *temporarily* just disable the error. --- examples/SDL2-video-demo/CMakeLists.txt | 2 +- examples/cairo-pdf-rendering/CMakeLists.txt | 2 +- examples/clay-official-website/CMakeLists.txt | 4 ++-- examples/cpp-project-example/CMakeLists.txt | 4 ++-- examples/introducing-clay-video-demo/CMakeLists.txt | 4 ++-- examples/raylib-sidebar-scrolling-container/CMakeLists.txt | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/SDL2-video-demo/CMakeLists.txt b/examples/SDL2-video-demo/CMakeLists.txt index b058ddb..f8e20b8 100644 --- a/examples/SDL2-video-demo/CMakeLists.txt +++ b/examples/SDL2-video-demo/CMakeLists.txt @@ -33,7 +33,7 @@ target_link_libraries(SDL2_video_demo PUBLIC SDL2::SDL2-static SDL2_ttf::SDL2_ttf-static ) -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -DCLAY_DEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -Wno-error=missing-braces -DCLAY_DEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3") add_custom_command( diff --git a/examples/cairo-pdf-rendering/CMakeLists.txt b/examples/cairo-pdf-rendering/CMakeLists.txt index b40d1ad..e1afff1 100644 --- a/examples/cairo-pdf-rendering/CMakeLists.txt +++ b/examples/cairo-pdf-rendering/CMakeLists.txt @@ -8,7 +8,7 @@ target_compile_options(clay_examples_cairo_pdf_rendering PUBLIC) target_include_directories(clay_examples_cairo_pdf_rendering PUBLIC .) target_link_libraries(clay_examples_cairo_pdf_rendering PUBLIC cairo) -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror") +set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -Wno-error=missing-braces") set(CMAKE_CXX_FLAGS_RELEASE "-O3") add_custom_command( diff --git a/examples/clay-official-website/CMakeLists.txt b/examples/clay-official-website/CMakeLists.txt index 02a3c8c..904e825 100644 --- a/examples/clay-official-website/CMakeLists.txt +++ b/examples/clay-official-website/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_C_STANDARD 99) add_executable(clay_official_website main.c) -target_compile_options(clay_official_website PUBLIC -Wall -Werror -Wno-unknown-pragmas) +target_compile_options(clay_official_website PUBLIC -Wall -Werror -Wno-unknown-pragmas -Wno-error=missing-braces) target_include_directories(clay_official_website PUBLIC .) -set(CMAKE_CXX_FLAGS_RELEASE "-O3") \ No newline at end of file +set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/examples/cpp-project-example/CMakeLists.txt b/examples/cpp-project-example/CMakeLists.txt index 3fc13be..dac9b89 100644 --- a/examples/cpp-project-example/CMakeLists.txt +++ b/examples/cpp-project-example/CMakeLists.txt @@ -8,5 +8,5 @@ add_executable(clay_examples_cpp_project_example main.cpp) target_include_directories(clay_examples_cpp_project_example PUBLIC .) -set(CMAKE_CXX_FLAGS_DEBUG "-Werror -Wall") -set(CMAKE_CXX_FLAGS_RELEASE "-O3") \ No newline at end of file +set(CMAKE_CXX_FLAGS_DEBUG "-Werror -Wall -Wno-error=missing-braces") +set(CMAKE_CXX_FLAGS_RELEASE "-O3") diff --git a/examples/introducing-clay-video-demo/CMakeLists.txt b/examples/introducing-clay-video-demo/CMakeLists.txt index 7e81e30..85fa085 100644 --- a/examples/introducing-clay-video-demo/CMakeLists.txt +++ b/examples/introducing-clay-video-demo/CMakeLists.txt @@ -24,11 +24,11 @@ target_compile_options(clay_examples_introducing_clay_video_demo PUBLIC) target_include_directories(clay_examples_introducing_clay_video_demo PUBLIC .) target_link_libraries(clay_examples_introducing_clay_video_demo PUBLIC raylib) -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -DCLAY_DEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -Wno-error=missing-braces -DCLAY_DEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3") add_custom_command( TARGET clay_examples_introducing_clay_video_demo POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/resources - ${CMAKE_CURRENT_BINARY_DIR}/resources) \ No newline at end of file + ${CMAKE_CURRENT_BINARY_DIR}/resources) diff --git a/examples/raylib-sidebar-scrolling-container/CMakeLists.txt b/examples/raylib-sidebar-scrolling-container/CMakeLists.txt index 6d29c5c..deeaa2d 100644 --- a/examples/raylib-sidebar-scrolling-container/CMakeLists.txt +++ b/examples/raylib-sidebar-scrolling-container/CMakeLists.txt @@ -24,11 +24,11 @@ target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC) target_include_directories(clay_examples_raylib_sidebar_scrolling_container PUBLIC .) target_link_libraries(clay_examples_raylib_sidebar_scrolling_container PUBLIC raylib) -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -DCLAY_DEBUG") +set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror -Wno-error=missing-braces -DCLAY_DEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3") add_custom_command( TARGET clay_examples_raylib_sidebar_scrolling_container POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/resources - ${CMAKE_CURRENT_BINARY_DIR}/resources) \ No newline at end of file + ${CMAKE_CURRENT_BINARY_DIR}/resources)