Torque3D/Engine/lib/speex/cmake/TestVarArrays.cmake
marauder2k7 3889798818 add speex
in order to access the experimental code in libsndfile have to have speex...
2024-03-23 09:55:21 +00:00

22 lines
462 B
CMake

include(CheckCSourceCompiles)
macro(TEST_VARARRAYS VARIABLE)
if(NOT DEFINED ${VARIABLE})
check_c_source_compiles(
"
void main(void)
{
int foo;
foo = 10;
int array[foo];
};
"
VARARRAYS_SUPPORT)
set(${VARIABLE} ${VARARRAYS_SUPPORT} CACHE INTERNAL "C99 variable-size arrays support" FORCE)
if(${VARIABLE})
set(RESULT_TEXT "success")
else()
set(RESULT_TEXT "failed")
endif()
endif()
endmacro(TEST_VARARRAYS VARIABLE)