diff options
author | Chris Robinson <[email protected]> | 2014-05-22 08:46:13 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-22 08:46:13 -0700 |
commit | 85e990e915efae2ab34d191af5f926730197979d (patch) | |
tree | b822d7965bcd024e2099cdc8754e49da375bee2c /CMakeLists.txt | |
parent | 2b3550b61cf1d937ba74529556781217c3f4730b (diff) |
Don't try to use the non-standard alloca.h
Variable-length arrays are C99 standard and are preferred over alloca. The only
compiler that needs alloca (MSVC) has it in malloc.h.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ace3633c..d9296ed1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -318,9 +318,6 @@ CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(pri CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H) CHECK_INCLUDE_FILE(stdalign.h HAVE_STDALIGN_H) -IF(NOT HAVE_C99_VLA) - CHECK_INCLUDE_FILE(alloca.h HAVE_ALLOCA_H) -ENDIF() CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H) CHECK_INCLUDE_FILE(ftw.h HAVE_FTW_H) CHECK_INCLUDE_FILE(io.h HAVE_IO_H) @@ -348,11 +345,7 @@ CHECK_SYMBOL_EXISTS(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN) CHECK_SYMBOL_EXISTS(_aligned_malloc malloc.h HAVE__ALIGNED_MALLOC) CHECK_SYMBOL_EXISTS(lrintf math.h HAVE_LRINTF) IF(NOT HAVE_C99_VLA) - IF(HAVE_ALLOCA_H) - CHECK_SYMBOL_EXISTS(alloca alloca.h HAVE_ALLOCA) - ELSEIF(HAVE_MALLOC_H) - CHECK_SYMBOL_EXISTS(alloca malloc.h HAVE_ALLOCA) - ENDIF() + CHECK_SYMBOL_EXISTS(alloca malloc.h HAVE_ALLOCA) IF(NOT HAVE_ALLOCA) MESSAGE(FATAL_ERROR "No alloca function found, please report!") ENDIF() |