Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable c++20 #173

Merged
merged 10 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CheckExperimentalMemoryResource.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
include(CheckCXXSourceCompiles)

# The libc++ implementation that ships with clang < v16 still
# has the memory_resource header under experimental.
#
# This functions checks if we are using such a standard library
# implementation.
#
function(check_experimental_memory_resource success)
check_cxx_source_compiles("
#include <experimental/memory_resource>
int main() {
return 0;
}
" ${success})
endfunction()
18 changes: 18 additions & 0 deletions CheckLibcpp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
include(CheckCXXSourceCompiles)

# Checks if libc++ is being used
#
function(check_libcpp success)
check_cxx_source_compiles("
#include <iostream>
int a =
#ifdef _LIBCPP_VERSION
1;
#else
kdfasfdl
#endif
int main() {
return 0;
}
" ${success})
endfunction()
Loading