forked from boostorg/config
Added test support for BOOST_HAS_SGI_TYPE_TRAITS, added test for -lrt in configure script.
[SVN r11488]
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
// (C) Copyright John Maddock 2001. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
// MACRO: BOOST_HAS_SGI_TYPE_TRAITS
|
||||
// TITLE: SGI style <type_traits.h>
|
||||
// DESCRIPTION: The standard library has it's own type_traits implementation.
|
||||
|
||||
#include <type_traits.h>
|
||||
|
||||
|
||||
namespace boost_has_sgi_type_traits{
|
||||
|
||||
struct foo_type{};
|
||||
|
||||
int test()
|
||||
{
|
||||
::__true_type t;
|
||||
::__false_type f;
|
||||
typedef ::__type_traits<int>::has_trivial_destructor td;
|
||||
typedef ::__type_traits<double>::has_trivial_assignment_operator ta;
|
||||
typedef ::__type_traits<float>::has_trivial_copy_constructor tc;
|
||||
typedef ::__type_traits<char>::has_trivial_default_constructor tdc;
|
||||
typedef ::__type_traits<foo_type>::is_POD_type isp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -836,6 +836,7 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_HAS_PTHREAD_YIELD);
|
||||
PRINT_MACRO(BOOST_HAS_PTHREADS);
|
||||
PRINT_MACRO(BOOST_HAS_SCHED_YIELD);
|
||||
PRINT_MACRO(BOOST_HAS_SGI_TYPE_TRAITS);
|
||||
PRINT_MACRO(BOOST_HAS_STDINT_H);
|
||||
PRINT_MACRO(BOOST_HAS_SLIST);
|
||||
PRINT_MACRO(BOOST_HAS_STLP_USE_FACET);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
// Do not edit this file, it was generated automatically by
|
||||
// ../tools/generate from boost_*.cxx on
|
||||
// Wed Oct 17 12:10:00 2001
|
||||
// Wed Oct 31 12:19:39 2001
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#define BOOST_INCLUDE_MAIN
|
||||
@@ -287,6 +287,11 @@ namespace boost_has_pthreads = empty_boost;
|
||||
#else
|
||||
namespace boost_has_sched_yield = empty_boost;
|
||||
#endif
|
||||
#ifdef BOOST_HAS_SGI_TYPE_TRAITS
|
||||
#include "boost_has_sgi_type_traits.cxx"
|
||||
#else
|
||||
namespace boost_has_sgi_type_traits = empty_boost;
|
||||
#endif
|
||||
#ifdef BOOST_HAS_SLIST
|
||||
#include "boost_has_slist.cxx"
|
||||
#else
|
||||
@@ -371,6 +376,7 @@ int test_main( int, char *[] )
|
||||
BOOST_TEST(0 == boost_has_stlp_use_facet::test());
|
||||
BOOST_TEST(0 == boost_has_stdint_h::test());
|
||||
BOOST_TEST(0 == boost_has_slist::test());
|
||||
BOOST_TEST(0 == boost_has_sgi_type_traits::test());
|
||||
BOOST_TEST(0 == boost_has_sched_yield::test());
|
||||
BOOST_TEST(0 == boost_has_pthreads::test());
|
||||
BOOST_TEST(0 == boost_has_pthread_yield::test());
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
// Test file for macro BOOST_HAS_SGI_TYPE_TRAITS
|
||||
// This file should not compile, if it does then
|
||||
// BOOST_HAS_SGI_TYPE_TRAITS may be defined.
|
||||
// see boost_has_sgi_type_traits.cxx for more details
|
||||
|
||||
// Do not edit this file, it was generated automatically by
|
||||
// ../tools/generate from boost_has_sgi_type_traits.cxx on
|
||||
// Wed Oct 31 12:19:39 2001
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
// the objective of this file:
|
||||
#ifdef BOOST_ASSERT_CONFIG
|
||||
# undef BOOST_ASSERT_CONFIG
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/test/cpp_main.cpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifndef BOOST_HAS_SGI_TYPE_TRAITS
|
||||
#include "boost_has_sgi_type_traits.cxx"
|
||||
#else
|
||||
#error "this file should not compile"
|
||||
#endif
|
||||
|
||||
int cpp_main( int, char *[] )
|
||||
{
|
||||
return boost_has_sgi_type_traits::test();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
// (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
// Test file for macro BOOST_HAS_SGI_TYPE_TRAITS
|
||||
// This file should compile, if it does not then
|
||||
// BOOST_HAS_SGI_TYPE_TRAITS should not be defined.
|
||||
// see boost_has_sgi_type_traits.cxx for more details
|
||||
|
||||
// Do not edit this file, it was generated automatically by
|
||||
// ../tools/generate from boost_has_sgi_type_traits.cxx on
|
||||
// Wed Oct 31 12:19:39 2001
|
||||
|
||||
// Must not have BOOST_ASSERT_CONFIG set; it defeats
|
||||
// the objective of this file:
|
||||
#ifdef BOOST_ASSERT_CONFIG
|
||||
# undef BOOST_ASSERT_CONFIG
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/test/cpp_main.cpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#ifdef BOOST_HAS_SGI_TYPE_TRAITS
|
||||
#include "boost_has_sgi_type_traits.cxx"
|
||||
#else
|
||||
namespace boost_has_sgi_type_traits = empty_boost;
|
||||
#endif
|
||||
|
||||
int cpp_main( int, char *[] )
|
||||
{
|
||||
return boost_has_sgi_type_traits::test();
|
||||
}
|
||||
|
||||
@@ -113,6 +113,8 @@ run libs/config/test/has_pthreads_pass.cpp
|
||||
link-fail libs/config/test/has_pthreads_fail.cpp
|
||||
run libs/config/test/has_sched_yield_pass.cpp
|
||||
link-fail libs/config/test/has_sched_yield_fail.cpp
|
||||
run libs/config/test/has_sgi_type_traits_pass.cpp
|
||||
link-fail libs/config/test/has_sgi_type_traits_fail.cpp
|
||||
run libs/config/test/has_slist_pass.cpp
|
||||
link-fail libs/config/test/has_slist_fail.cpp
|
||||
run libs/config/test/has_stdint_h_pass.cpp
|
||||
|
||||
Reference in New Issue
Block a user