diff options
author | Chris Robinson <[email protected]> | 2021-01-22 08:53:44 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-22 08:53:44 -0800 |
commit | f576a353638236775ecb4f4e8ba93cb1716fbe2d (patch) | |
tree | a9c4be63a500465264136580d15e62af14ebab60 /CMakeLists.txt | |
parent | 1dcc6361fe5c06dfd3ec30cfb9bce04e0c522805 (diff) |
Don't bother checking for std::aligned_alloc
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 651f84e8..1f355508 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,19 +153,9 @@ set(EXPORT_DECL "") # Require C++14 set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) -if(CMAKE_CXX14_EXTENSION_COMPILE_OPTION) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX14_EXTENSION_COMPILE_OPTION}") -elseif(CMAKE_CXX14_STANDARD_COMPILE_OPTION) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX14_STANDARD_COMPILE_OPTION}") -endif() # Prefer C11, but support C99 and C90 too. set(CMAKE_C_STANDARD 11) -if(CMAKE_C11_EXTENSION_COMPILE_OPTION) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C11_EXTENSION_COMPILE_OPTION}") -elseif(CMAKE_C11_STANDARD_COMPILE_OPTION) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C11_STANDARD_COMPILE_OPTION}") -endif() if(NOT WIN32) # Check if _POSIX_C_SOURCE and _XOPEN_SOURCE needs to be set for POSIX functions @@ -534,13 +524,6 @@ if(HAVE_INTRIN_H) }" HAVE_CPUID_INTRINSIC) endif() -check_cxx_source_compiles("#include <cstdlib> -int main() -{ - void *ptr{std::aligned_alloc(alignof(int), sizeof(int))}; - std::free(ptr); - return 0; -}" HAVE_STD_ALIGNED_ALLOC) check_symbol_exists(posix_memalign stdlib.h HAVE_POSIX_MEMALIGN) check_symbol_exists(_aligned_malloc malloc.h HAVE__ALIGNED_MALLOC) check_symbol_exists(proc_pidpath libproc.h HAVE_PROC_PIDPATH) |