diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-06-13 22:15:48 +0200 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-06-13 22:15:48 +0200 |
commit | 95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3 (patch) | |
tree | 352480349a46d19ab5b8078ac4ccb79d27166f04 /raylib/cmake/EnumOption.cmake | |
parent | mouse is captured again, pretty gud (diff) | |
download | yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.gz yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.bz2 yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.xz yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.tar.zst yabs-95cde5c181b5fd1d9ee3f13db749799c4e8ac9d3.zip |
add raylib to the build chain with -O3 and -march=native
Diffstat (limited to 'raylib/cmake/EnumOption.cmake')
-rw-r--r-- | raylib/cmake/EnumOption.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
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() |