Skip to content

Commit

Permalink
[C] Convert element macros to use for() internally (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicbarker authored Sep 28, 2024
1 parent 1b410dd commit 5e7c4c4
Show file tree
Hide file tree
Showing 9 changed files with 459 additions and 456 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmake-build-debug/
cmake-build-release/
.DS_Store
.idea/
build/
node_modules/
210 changes: 105 additions & 105 deletions README.md

Large diffs are not rendered by default.

292 changes: 141 additions & 151 deletions clay.h

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/clay-official-website/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set(CMAKE_C_STANDARD 99)

add_executable(clay_official_website main.c)

target_compile_options(clay_official_website PUBLIC -Wno-initializer-overrides)
target_compile_options(clay_official_website PUBLIC -Wall -Werror -Wno-unknown-pragmas)
target_include_directories(clay_official_website PUBLIC .)

set(CMAKE_CXX_FLAGS_RELEASE "-O3")
2 changes: 1 addition & 1 deletion examples/clay-official-website/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mkdir -p build/clay \
&& clang \
-Wall \
-WError \
-Werror \
-Os \
-DCLAY_WASM \
-mbulk-memory \
Expand Down
282 changes: 141 additions & 141 deletions examples/clay-official-website/main.c

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/raylib-sidebar-scrolling-container/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ FetchContent_MakeAvailable(raylib)

set(CMAKE_C_STANDARD 99)

add_executable(clay_examples_raylib_sidebar_scrolling_container main.c)
add_executable(clay_examples_raylib_sidebar_scrolling_container main.c multi-compilation-unit.c)

target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC)
target_compile_options(clay_examples_raylib_sidebar_scrolling_container PUBLIC -Wall -Werror -Wno-unknown-pragmas)
target_include_directories(clay_examples_raylib_sidebar_scrolling_container PUBLIC .)

target_link_libraries(clay_examples_raylib_sidebar_scrolling_container PUBLIC raylib)
Expand Down
110 changes: 55 additions & 55 deletions examples/raylib-sidebar-scrolling-container/main.c

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "../../clay.h"

// NOTE: This file only exists to make sure that clay works when included in multiple translation units.

void SatisfyCompiler() {
CLAY_CONTAINER(CLAY_ID("SatisfyCompiler"), CLAY_LAYOUT()) {}
}

0 comments on commit 5e7c4c4

Please sign in to comment.