mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
detect the presence of std::shared_ptr
since GCC 4.4 supports it, make it mandatory as well...
This commit is contained in:
parent
bddcff89f2
commit
999d198181
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Sets the follwing variable:
|
# Sets the follwing variable:
|
||||||
#
|
#
|
||||||
|
# HAVE_SHARED_PTR True if std::shared_ptr is available
|
||||||
# HAVE_NULLPTR True if nullptr is available
|
# HAVE_NULLPTR True if nullptr is available
|
||||||
# HAVE_ARRAY True if header <array> and fill() are available
|
# HAVE_ARRAY True if header <array> and fill() are available
|
||||||
# HAVE_ATTRIBUTE_ALWAYS_INLINE True if attribute always inline is supported
|
# HAVE_ATTRIBUTE_ALWAYS_INLINE True if attribute always inline is supported
|
||||||
@ -43,6 +44,18 @@ endif(CXX_FLAG_CXX11)
|
|||||||
# perform tests
|
# perform tests
|
||||||
include(CheckCXXSourceCompiles)
|
include(CheckCXXSourceCompiles)
|
||||||
|
|
||||||
|
# nullptr
|
||||||
|
CHECK_CXX_SOURCE_COMPILES("
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
std::shared_ptr<int> foo(new int(123));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
" HAVE_SHARED_PTR
|
||||||
|
)
|
||||||
|
|
||||||
# nullptr
|
# nullptr
|
||||||
CHECK_CXX_SOURCE_COMPILES("
|
CHECK_CXX_SOURCE_COMPILES("
|
||||||
int main(void)
|
int main(void)
|
||||||
@ -296,6 +309,10 @@ endforeach(_HEADER tuple tr1/tuple tr1/type_traits)
|
|||||||
# superset of those provided by GCC 4.4. This makes the test fail on
|
# superset of those provided by GCC 4.4. This makes the test fail on
|
||||||
# all GCC compilers before 4.4.
|
# all GCC compilers before 4.4.
|
||||||
set(CXX_FEATURES_MISSING "")
|
set(CXX_FEATURES_MISSING "")
|
||||||
|
if (NOT HAVE_SHARED_PTR)
|
||||||
|
set(CXX_FEATURES_MISSING
|
||||||
|
"${CXX_FEATURES_MISSING} - Shared pointers (the std::shared_ptr class)\n")
|
||||||
|
endif()
|
||||||
if (NOT HAVE_ARRAY)
|
if (NOT HAVE_ARRAY)
|
||||||
set(CXX_FEATURES_MISSING
|
set(CXX_FEATURES_MISSING
|
||||||
"${CXX_FEATURES_MISSING} - Statically sized arrays (the std::array class)\n")
|
"${CXX_FEATURES_MISSING} - Statically sized arrays (the std::array class)\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user