C++20 Support (#31)

This commit is contained in:
Nic Barker 2024-09-29 12:53:46 +13:00 committed by GitHub
parent 21d9f06a47
commit 948b7ce70b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 371 additions and 246 deletions

View file

@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.28)
project(clay_examples_cpp_project_example CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -g")
add_executable(clay_examples_cpp_project_example main.cpp)
target_include_directories(clay_examples_cpp_project_example PUBLIC .)
set(CMAKE_CXX_FLAGS_DEBUG "-Wall")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")

View file

@ -0,0 +1,10 @@
#include <iostream>
#define CLAY_IMPLEMENTATION
#include "../../clay.h"
int main(void) {
uint64_t totalMemorySize = Clay_MinMemorySize();
Clay_Arena clayMemory = Clay_Arena { .label = CLAY_STRING("Clay Memory Arena"), .capacity = totalMemorySize, .memory = (char *)malloc(totalMemorySize) };
Clay_Initialize(clayMemory, Clay_Dimensions {1024,768});
return 0;
}