- Added a va_copy/__va_copy check to CMakeLists.txt.

SVN r1526 (trunk)
This commit is contained in:
Randy Heit 2009-04-08 04:33:29 +00:00
parent cc9efce818
commit 2ac649e09d

View file

@ -151,6 +151,23 @@ else( WIN32 )
include_directories( ${FPU_CONTROL_DIR} )
add_definitions( -DHAVE_FPU_CONTROL )
endif( FPU_CONTROL_DIR )
include( CheckCXXSourceCompiles )
CHECK_CXX_SOURCE_COMPILES(
"#include <stdarg.h>
int main() { va_list list1, list2; va_copy(list1, list2); return 0; }"
HAS_VA_COPY )
if( NOT HAS_VA_COPY )
CHECK_CXX_SOURCE_COMPILES(
"#include <stdarg.h>
int main() { va_list list1, list2; __va_copy(list1, list2); return 0; }"
HAS___VA_COPY )
if( HAS___VA_COPY )
add_definitions( -Dva_copy=__va_copy )
else( HAS___VA_COPY )
message( SEND_ERROR "Compiler does not support va_copy or __va_copy" )
endif( HAS___VA_COPY )
endif( NOT HAS_VA_COPY )
endif( WIN32 )
# Decide on the name of the FMOD library we want to use.