mirror of
https://github.com/boostorg/config.git
synced 2025-08-01 05:14:28 +02:00
Fix some warnings and miswritten test case, add test for BOOST_HAS_PRAGMA_DETECT_MISMATCH.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#
|
#
|
||||||
# *** DO NOT EDIT THIS FILE BY HAND ***
|
# *** DO NOT EDIT THIS FILE BY HAND ***
|
||||||
# This file was automatically generated on Tue Mar 6 17:44:35 2018
|
# This file was automatically generated on Wed Apr 18 20:03:40 2018
|
||||||
# by libs/config/tools/generate.cpp
|
# by libs/config/tools/generate.cpp
|
||||||
# Copyright John Maddock.
|
# Copyright John Maddock.
|
||||||
# Use, modification and distribution are subject to the
|
# Use, modification and distribution are subject to the
|
||||||
@@ -14,6 +14,7 @@ import path ;
|
|||||||
obj two_arg_use_facet : test_case.cpp : <define>TEST_BOOST_HAS_TWO_ARG_USE_FACET ;
|
obj two_arg_use_facet : test_case.cpp : <define>TEST_BOOST_HAS_TWO_ARG_USE_FACET ;
|
||||||
obj bethreads : test_case.cpp : <define>TEST_BOOST_HAS_BETHREADS ;
|
obj bethreads : test_case.cpp : <define>TEST_BOOST_HAS_BETHREADS ;
|
||||||
obj clock_gettime : test_case.cpp : <define>TEST_BOOST_HAS_CLOCK_GETTIME ;
|
obj clock_gettime : test_case.cpp : <define>TEST_BOOST_HAS_CLOCK_GETTIME ;
|
||||||
|
obj pragma_detect_mismatch : test_case.cpp : <define>TEST_BOOST_HAS_PRAGMA_DETECT_MISMATCH ;
|
||||||
obj dirent_h : test_case.cpp : <define>TEST_BOOST_HAS_DIRENT_H ;
|
obj dirent_h : test_case.cpp : <define>TEST_BOOST_HAS_DIRENT_H ;
|
||||||
obj expm1 : test_case.cpp : <define>TEST_BOOST_HAS_EXPM1 ;
|
obj expm1 : test_case.cpp : <define>TEST_BOOST_HAS_EXPM1 ;
|
||||||
obj float128 : test_case.cpp : <define>TEST_BOOST_HAS_FLOAT128 ;
|
obj float128 : test_case.cpp : <define>TEST_BOOST_HAS_FLOAT128 ;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// This file was automatically generated on Tue Mar 6 17:44:35 2018
|
// This file was automatically generated on Wed Apr 18 20:03:40 2018
|
||||||
// by libs/config/tools/generate.cpp
|
// by libs/config/tools/generate.cpp
|
||||||
// Copyright John Maddock 2002-4.
|
// Copyright John Maddock 2002-4.
|
||||||
// Use, modification and distribution are subject to the
|
// Use, modification and distribution are subject to the
|
||||||
@@ -26,6 +26,11 @@
|
|||||||
# error "Feature macro BOOST_HAS_CLOCK_GETTIME is not defined."
|
# error "Feature macro BOOST_HAS_CLOCK_GETTIME is not defined."
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef TEST_BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
# ifndef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
# error "Feature macro BOOST_HAS_PRAGMA_DETECT_MISMATCH is not defined."
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
#ifdef TEST_BOOST_HAS_DIRENT_H
|
#ifdef TEST_BOOST_HAS_DIRENT_H
|
||||||
# ifndef BOOST_HAS_DIRENT_H
|
# ifndef BOOST_HAS_DIRENT_H
|
||||||
# error "Feature macro BOOST_HAS_DIRENT_H is not defined."
|
# error "Feature macro BOOST_HAS_DIRENT_H is not defined."
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Regression test Jamfile for boost configuration setup.
|
# Regression test Jamfile for boost configuration setup.
|
||||||
# *** DO NOT EDIT THIS FILE BY HAND ***
|
# *** DO NOT EDIT THIS FILE BY HAND ***
|
||||||
# This file was automatically generated on Tue Mar 6 17:44:35 2018
|
# This file was automatically generated on Wed Apr 18 20:03:40 2018
|
||||||
# by libs/config/tools/generate.cpp
|
# by libs/config/tools/generate.cpp
|
||||||
# Copyright John Maddock.
|
# Copyright John Maddock.
|
||||||
# Use, modification and distribution are subject to the
|
# Use, modification and distribution are subject to the
|
||||||
@@ -31,6 +31,9 @@ test-suite "BOOST_HAS_BETHREADS" :
|
|||||||
test-suite "BOOST_HAS_CLOCK_GETTIME" :
|
test-suite "BOOST_HAS_CLOCK_GETTIME" :
|
||||||
[ run ../has_clock_gettime_pass.cpp ]
|
[ run ../has_clock_gettime_pass.cpp ]
|
||||||
[ compile-fail ../has_clock_gettime_fail.cpp ] ;
|
[ compile-fail ../has_clock_gettime_fail.cpp ] ;
|
||||||
|
test-suite "BOOST_HAS_PRAGMA_DETECT_MISMATCH" :
|
||||||
|
[ run ../has_detect_mismatch_pass.cpp ]
|
||||||
|
[ compile-fail ../has_detect_mismatch_fail.cpp ] ;
|
||||||
test-suite "BOOST_HAS_DIRENT_H" :
|
test-suite "BOOST_HAS_DIRENT_H" :
|
||||||
[ run ../has_dirent_h_pass.cpp ]
|
[ run ../has_dirent_h_pass.cpp ]
|
||||||
[ compile-fail ../has_dirent_h_fail.cpp ] ;
|
[ compile-fail ../has_dirent_h_fail.cpp ] ;
|
||||||
|
24
test/boost_has_detect_mismatch.ipp
Normal file
24
test/boost_has_detect_mismatch.ipp
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// (C) Copyright John Maddock 2018.
|
||||||
|
// Use, modification and distribution are subject to the
|
||||||
|
// Boost Software License, Version 1.0. (See accompanying file
|
||||||
|
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
// See http://www.boost.org/libs/config for most recent version.
|
||||||
|
|
||||||
|
// MACRO: BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
// TITLE: detect_mismatch pragma
|
||||||
|
// DESCRIPTION: The compiler supports #pragma detect_mismatch
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
|
||||||
|
namespace boost_has_pragma_detect_mismatch {
|
||||||
|
|
||||||
|
int test()
|
||||||
|
{
|
||||||
|
# pragma detect_mismatch("Boost_Config", "1")
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@@ -25,7 +25,7 @@ namespace boost_has_partial_std_allocator{
|
|||||||
//
|
//
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
int test_allocator(const T& i)
|
int test_allocator(const T&)
|
||||||
{
|
{
|
||||||
typedef std::allocator<int> alloc1_t;
|
typedef std::allocator<int> alloc1_t;
|
||||||
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
|
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
|
||||||
|
@@ -52,6 +52,8 @@ int test()
|
|||||||
a1 |= 2;
|
a1 |= 2;
|
||||||
a1 ^= 3;
|
a1 ^= 3;
|
||||||
|
|
||||||
|
a2 = 0u;
|
||||||
|
|
||||||
a3.store(&v);
|
a3.store(&v);
|
||||||
a3.fetch_add(1);
|
a3.fetch_add(1);
|
||||||
a3.fetch_sub(1);
|
a3.fetch_sub(1);
|
||||||
|
@@ -17,6 +17,7 @@ namespace boost_no_cxx11_hdr_tuple {
|
|||||||
int test()
|
int test()
|
||||||
{
|
{
|
||||||
std::tuple<int, int, long> t(0, 1, 2);
|
std::tuple<int, int, long> t(0, 1, 2);
|
||||||
|
(void)t;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ namespace boost_no_cxx11_pointer_traits {
|
|||||||
template<class T>
|
template<class T>
|
||||||
struct pointer {
|
struct pointer {
|
||||||
template<class U>
|
template<class U>
|
||||||
using rebind = pointer<bool>;
|
using rebind = pointer<U>;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -31,7 +31,7 @@ struct result<pointer<bool> > {
|
|||||||
|
|
||||||
int test()
|
int test()
|
||||||
{
|
{
|
||||||
return result<std::pointer_traits<pointer<int> >::rebind<char> >::value;
|
return result<std::pointer_traits<pointer<int> >::rebind<bool> >::value;
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* boost_no_cxx11_pointer_traits */
|
} /* boost_no_cxx11_pointer_traits */
|
||||||
|
@@ -25,7 +25,7 @@ namespace boost_no_std_allocator{
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
int test_allocator(const T& i)
|
int test_allocator(const T&)
|
||||||
{
|
{
|
||||||
typedef std::allocator<int> alloc1_t;
|
typedef std::allocator<int> alloc1_t;
|
||||||
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
|
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
|
||||||
|
@@ -1054,6 +1054,7 @@ void print_boost_macros()
|
|||||||
PRINT_MACRO(BOOST_HAS_NL_TYPES_H);
|
PRINT_MACRO(BOOST_HAS_NL_TYPES_H);
|
||||||
PRINT_MACRO(BOOST_HAS_NRVO);
|
PRINT_MACRO(BOOST_HAS_NRVO);
|
||||||
PRINT_MACRO(BOOST_HAS_PARTIAL_STD_ALLOCATOR);
|
PRINT_MACRO(BOOST_HAS_PARTIAL_STD_ALLOCATOR);
|
||||||
|
PRINT_MACRO(BOOST_HAS_PRAGMA_DETECT_MISMATCH);
|
||||||
PRINT_MACRO(BOOST_HAS_PTHREADS);
|
PRINT_MACRO(BOOST_HAS_PTHREADS);
|
||||||
PRINT_MACRO(BOOST_HAS_PTHREAD_DELAY_NP);
|
PRINT_MACRO(BOOST_HAS_PTHREAD_DELAY_NP);
|
||||||
PRINT_MACRO(BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE);
|
PRINT_MACRO(BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE);
|
||||||
@@ -1235,6 +1236,7 @@ void print_boost_macros()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// END GENERATED BLOCK
|
// END GENERATED BLOCK
|
||||||
|
|
||||||
PRINT_MACRO(BOOST_INTEL);
|
PRINT_MACRO(BOOST_INTEL);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// This file was automatically generated on Tue Mar 6 17:44:35 2018
|
// This file was automatically generated on Wed Apr 18 20:03:40 2018
|
||||||
// by libs/config/tools/generate.cpp
|
// by libs/config/tools/generate.cpp
|
||||||
// Copyright John Maddock 2002-4.
|
// Copyright John Maddock 2002-4.
|
||||||
// Use, modification and distribution are subject to the
|
// Use, modification and distribution are subject to the
|
||||||
@@ -823,6 +823,11 @@ namespace boost_has_bethreads = empty_boost;
|
|||||||
#else
|
#else
|
||||||
namespace boost_has_clock_gettime = empty_boost;
|
namespace boost_has_clock_gettime = empty_boost;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
#include "boost_has_detect_mismatch.ipp"
|
||||||
|
#else
|
||||||
|
namespace boost_has_pragma_detect_mismatch = empty_boost;
|
||||||
|
#endif
|
||||||
#ifdef BOOST_HAS_DIRENT_H
|
#ifdef BOOST_HAS_DIRENT_H
|
||||||
#include "boost_has_dirent_h.ipp"
|
#include "boost_has_dirent_h.ipp"
|
||||||
#else
|
#else
|
||||||
@@ -1006,6 +1011,11 @@ int main( int, char *[] )
|
|||||||
std::cerr << "Failed test for BOOST_HAS_CLOCK_GETTIME at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
std::cerr << "Failed test for BOOST_HAS_CLOCK_GETTIME at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
++error_count;
|
++error_count;
|
||||||
}
|
}
|
||||||
|
if(0 != boost_has_pragma_detect_mismatch::test())
|
||||||
|
{
|
||||||
|
std::cerr << "Failed test for BOOST_HAS_PRAGMA_DETECT_MISMATCH at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
|
++error_count;
|
||||||
|
}
|
||||||
if(0 != boost_has_dirent_h::test())
|
if(0 != boost_has_dirent_h::test())
|
||||||
{
|
{
|
||||||
std::cerr << "Failed test for BOOST_HAS_DIRENT_H at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
std::cerr << "Failed test for BOOST_HAS_DIRENT_H at: " << __FILE__ << ":" << __LINE__ << std::endl;
|
||||||
|
37
test/has_detect_mismatch_fail.cpp
Normal file
37
test/has_detect_mismatch_fail.cpp
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
// This file was automatically generated on Wed Apr 18 20:03:40 2018
|
||||||
|
// by libs/config/tools/generate.cpp
|
||||||
|
// Copyright John Maddock 2002-4.
|
||||||
|
// Use, modification and distribution are subject to the
|
||||||
|
// Boost Software License, Version 1.0. (See accompanying file
|
||||||
|
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
// See http://www.boost.org/libs/config for the most recent version.//
|
||||||
|
// Revision $Id$
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Test file for macro BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
// This file should not compile, if it does then
|
||||||
|
// BOOST_HAS_PRAGMA_DETECT_MISMATCH should be defined.
|
||||||
|
// See file boost_has_detect_mismatch.ipp for details
|
||||||
|
|
||||||
|
// 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 "test.hpp"
|
||||||
|
|
||||||
|
#ifndef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
#include "boost_has_detect_mismatch.ipp"
|
||||||
|
#else
|
||||||
|
#error "this file should not compile"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_has_pragma_detect_mismatch::test();
|
||||||
|
}
|
||||||
|
|
37
test/has_detect_mismatch_pass.cpp
Normal file
37
test/has_detect_mismatch_pass.cpp
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
// This file was automatically generated on Wed Apr 18 20:03:40 2018
|
||||||
|
// by libs/config/tools/generate.cpp
|
||||||
|
// Copyright John Maddock 2002-4.
|
||||||
|
// Use, modification and distribution are subject to the
|
||||||
|
// Boost Software License, Version 1.0. (See accompanying file
|
||||||
|
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
|
// See http://www.boost.org/libs/config for the most recent version.//
|
||||||
|
// Revision $Id$
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
// Test file for macro BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
// This file should compile, if it does not then
|
||||||
|
// BOOST_HAS_PRAGMA_DETECT_MISMATCH should not be defined.
|
||||||
|
// See file boost_has_detect_mismatch.ipp for details
|
||||||
|
|
||||||
|
// 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 "test.hpp"
|
||||||
|
|
||||||
|
#ifdef BOOST_HAS_PRAGMA_DETECT_MISMATCH
|
||||||
|
#include "boost_has_detect_mismatch.ipp"
|
||||||
|
#else
|
||||||
|
namespace boost_has_pragma_detect_mismatch = empty_boost;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int main( int, char *[] )
|
||||||
|
{
|
||||||
|
return boost_has_pragma_detect_mismatch::test();
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user