Commit 5d1e9713 authored by Joseph G. Hennessey's avatar Joseph G. Hennessey

Merge branch 'make-cxx11sharedptrs-optional' into 'master'

make it easy to choose boost instead of the new cxx11 sptrs

See merge request !35
parents 3984a316 b503bf16
......@@ -104,21 +104,25 @@ endif (TIFF_FOUND)
option(XDMF_BUILD_DSM OFF)
mark_as_advanced(XDMF_BUILD_DSM)
# Test for Cxx11
unset(HAVE_CXX11_SHARED_PTR CACHE)
check_cxx_source_compiles("
#include <memory>
using namespace std;
struct Base { virtual ~Base(){} };
int main(int ac, char * av[])
{
shared_ptr<Base> ptr(new Base());
}
"
HAVE_CXX11_SHARED_PTR)
option(XDMF_TRY_NOBOOST ON)
mark_as_advanced(XDMF_TRY_NOBOOST)
if (XDMF_TRY_NOBOOST)
# Test for Cxx11
unset(HAVE_CXX11_SHARED_PTR CACHE)
check_cxx_source_compiles("
#include <memory>
using namespace std;
struct Base { virtual ~Base(){} };
int main(int ac, char * av[])
{
shared_ptr<Base> ptr(new Base());
}
"
HAVE_CXX11_SHARED_PTR)
endif ()
# Cxx11 does not work with swig due to an issue with swig
if (HAVE_CXX11_SHARED_PTR AND NOT XDMF_WRAP_PYTHON)
......
......@@ -133,18 +133,20 @@ int main(int ac, char * av[])
"
HAVE_BOOST_SHARED_DYNAMIC_CAST)
check_cxx_source_compiles("
#include <memory>
using namespace std;
struct Base { virtual ~Base(){} };
int main(int ac, char * av[])
{
shared_ptr<Base> ptr(new Base());
}
"
HAVE_CXX11_SHARED_PTR)
if (XDMF_TRY_NOBOOST)
check_cxx_source_compiles("
#include <memory>
using namespace std;
struct Base { virtual ~Base(){} };
int main(int ac, char * av[])
{
shared_ptr<Base> ptr(new Base());
}
"
HAVE_CXX11_SHARED_PTR)
endif ()
if (HAVE_CXX11_SHARED_PTR AND NOT XDMF_WRAP_PYTHON)
add_definitions(-DHAVE_CXX11_SHARED_PTR)
......
......@@ -14,18 +14,20 @@ option(XDMF_BUILD_DSM_THREADS ON)
# Test for Cxx11
unset(HAVE_CXX11_SHARED_PTR CACHE)
check_cxx_source_compiles("
#include <memory>
using namespace std;
struct Base { virtual ~Base(){} };
int main(int ac, char * av[])
{
shared_ptr<Base> ptr(new Base());
}
"
HAVE_CXX11_SHARED_PTR)
if (XDMF_TRY_NOBOOST)
check_cxx_source_compiles("
#include <memory>
using namespace std;
struct Base { virtual ~Base(){} };
int main(int ac, char * av[])
{
shared_ptr<Base> ptr(new Base());
}
"
HAVE_CXX11_SHARED_PTR)
endif ()
# Cxx11 does not work with swig due to an issue with swig
if (HAVE_CXX11_SHARED_PTR AND NOT XDMF_WRAP_PYTHON)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment