mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
also test for std::unique_ptr
This commit is contained in:
parent
113238badb
commit
6ff3b56b49
@ -4,6 +4,7 @@
|
||||
# Sets the follwing variable:
|
||||
#
|
||||
# HAVE_SHARED_PTR True if std::shared_ptr is available
|
||||
# HAVE_UNIQUE_PTR True if std::unique_ptr is available
|
||||
# HAVE_NULLPTR True if nullptr is available
|
||||
# HAVE_ARRAY True if header <array> and fill() are available
|
||||
# HAVE_ATTRIBUTE_ALWAYS_INLINE True if attribute always inline is supported
|
||||
@ -56,6 +57,18 @@ CHECK_CXX_SOURCE_COMPILES("
|
||||
" HAVE_SHARED_PTR
|
||||
)
|
||||
|
||||
# nullptr
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <memory>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
std::unique_ptr<int> foo(new int(123));
|
||||
return 0;
|
||||
}
|
||||
" HAVE_UNIQUE_PTR
|
||||
)
|
||||
|
||||
# nullptr
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
int main(void)
|
||||
@ -313,6 +326,10 @@ if (NOT HAVE_SHARED_PTR)
|
||||
set(CXX_FEATURES_MISSING
|
||||
"${CXX_FEATURES_MISSING} - Shared pointers (the std::shared_ptr class)\n")
|
||||
endif()
|
||||
if (NOT HAVE_UNIQUE_PTR)
|
||||
set(CXX_FEATURES_MISSING
|
||||
"${CXX_FEATURES_MISSING} - Unique pointers (the std::unique_ptr class)\n")
|
||||
endif()
|
||||
if (NOT HAVE_ARRAY)
|
||||
set(CXX_FEATURES_MISSING
|
||||
"${CXX_FEATURES_MISSING} - Statically sized arrays (the std::array class)\n")
|
||||
|
Loading…
Reference in New Issue
Block a user