From 95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Mon, 13 Jun 2022 22:15:48 +0200 Subject: add raylib to the build chain with -O3 and -march=native --- raylib/cmake/EnumOption.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 raylib/cmake/EnumOption.cmake (limited to 'raylib/cmake/EnumOption.cmake') diff --git a/raylib/cmake/EnumOption.cmake b/raylib/cmake/EnumOption.cmake new file mode 100644 index 0000000..d7d343f --- /dev/null +++ b/raylib/cmake/EnumOption.cmake @@ -0,0 +1,9 @@ +macro(enum_option var values description) + set(${var}_VALUES ${values}) + list(GET ${var}_VALUES 0 default) + set(${var} "${default}" CACHE STRING "${description}") + set_property(CACHE ${var} PROPERTY STRINGS ${${var}_VALUES}) + if (NOT ";${${var}_VALUES};" MATCHES ";${${var}};") + message(FATAL_ERROR "Unknown value ${${var}}. Only -D${var}=${${var}_VALUES} allowed.") + endif() +endmacro() -- cgit v1.2.3