diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-04 11:40:46 -0700 |
---|---|---|
committer | Mathias Preiner <mathias.preiner@gmail.com> | 2018-09-22 16:30:59 -0700 |
commit | 32bc6b382859a96f08f7ef78c0d64efc5235d227 (patch) | |
tree | 77539b00dc6e7673fcb97066aa32cb3bd0de6549 /cmake | |
parent | c255e8d8a39ca904ba6f99589fa06123c728d784 (diff) |
cmake: Add missing checks for cvc4autoconfig.h to ConfigureCVC4.cmake.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ConfigureCVC4.cmake | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cmake/ConfigureCVC4.cmake b/cmake/ConfigureCVC4.cmake index bd88a2a1d..e3152f5ca 100644 --- a/cmake/ConfigureCVC4.cmake +++ b/cmake/ConfigureCVC4.cmake @@ -1,4 +1,7 @@ include(CheckCXXSourceCompiles) +include(CheckIncludeFile) +include(CheckIncludeFileCXX) +include(CheckSymbolExists) # Check whether "long" and "int64_t" are distinct types w.r.t. overloading. # Even if they have the same size, they can be distinct, and some platforms @@ -34,3 +37,27 @@ check_cxx_source_compiles( if(CVC4_NEED_HASH_UINT64_T_OVERLOAD) add_definitions(-DCVC4_NEED_HASH_UINT64_T) endif() + +check_include_file(unistd.h HAVE_UNISTD_H) +check_include_file_cxx(ext/stdio_filebuf.h HAVE_EXT_STDIO_FILEBUF_H) + +check_symbol_exists(clock_gettime "time.h" HAVE_CLOCK_GETTIME) +check_symbol_exists(ffs "strings.h" HAVE_FFS) +check_symbol_exists(optreset "getopt.h" HAVE_DECL_OPTRESET) +check_symbol_exists(sigaltstack "signal.h" HAVE_SIGALTSTACK) +check_symbol_exists(strerror_r "string.h" HAVE_STRERROR_R) +check_symbol_exists(strtok_r "string.h" HAVE_STRTOK_R) + +# Determine if we have the POSIX (int) or GNU (char *) variant of strerror_r. +check_c_source_compiles( + " + #include <string.h> + int main(void) + { + char buf[1]; + char c = *strerror_r(0, buf, 0); + return 0; + } + " + STRERROR_R_CHAR_P +) |