From cdda4c4182c9ee068567529715e4a5c68a8efb58 Mon Sep 17 00:00:00 2001 From: bonmas14 Date: Sat, 20 Sep 2025 22:28:15 +0300 Subject: Init commit v1.0 --- deps/raylib/cmake/AddIfFlagCompiles.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 deps/raylib/cmake/AddIfFlagCompiles.cmake (limited to 'deps/raylib/cmake/AddIfFlagCompiles.cmake') diff --git a/deps/raylib/cmake/AddIfFlagCompiles.cmake b/deps/raylib/cmake/AddIfFlagCompiles.cmake new file mode 100644 index 0000000..403607b --- /dev/null +++ b/deps/raylib/cmake/AddIfFlagCompiles.cmake @@ -0,0 +1,12 @@ +include(CheckCCompilerFlag) +function(add_if_flag_compiles flag) + CHECK_C_COMPILER_FLAG("${flag}" COMPILER_HAS_THOSE_TOGGLES) + set(outcome "Failed") + if(COMPILER_HAS_THOSE_TOGGLES) + foreach(var ${ARGN}) + set(${var} "${flag} ${${var}}" PARENT_SCOPE) + endforeach() + set(outcome "compiles") + endif() + message(STATUS "Testing if ${flag} can be used -- ${outcome}") +endfunction() -- cgit v1.2.3-70-g09d2