mirror of
https://github.com/boostorg/uuid.git
synced 2026-01-19 04:42:16 +00:00
Add support for the BOOST_UUID_REPORT_IMPLEMENTATION macro, which outputs the chosen .ipp implementation
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
#include <boost/uuid/detail/endian.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
#if defined(BOOST_UUID_REPORT_IMPLEMENTATION)
|
||||
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
BOOST_PRAGMA_MESSAGE( "Using uuid_generic.ipp" )
|
||||
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace uuids {
|
||||
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
|
||||
#include <boost/uuid/detail/endian.hpp>
|
||||
|
||||
#if defined(BOOST_UUID_REPORT_IMPLEMENTATION)
|
||||
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
BOOST_PRAGMA_MESSAGE( "Using uuid_uint128.ipp" )
|
||||
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace uuids {
|
||||
|
||||
|
||||
@@ -16,6 +16,24 @@
|
||||
#include <boost/uuid/detail/endian.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
#if defined(BOOST_UUID_REPORT_IMPLEMENTATION)
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
#if defined(BOOST_UUID_USE_AVX10_1)
|
||||
BOOST_PRAGMA_MESSAGE( "Using uuid_x86.ipp, AVX10.1" )
|
||||
|
||||
#elif defined(BOOST_UUID_USE_SSE41)
|
||||
BOOST_PRAGMA_MESSAGE( "Using uuid_x86.ipp, SSE4.1" )
|
||||
|
||||
#elif defined(BOOST_UUID_USE_SSE3)
|
||||
BOOST_PRAGMA_MESSAGE( "Using uuid_x86.ipp, SSE3" )
|
||||
|
||||
#else
|
||||
BOOST_PRAGMA_MESSAGE( "Using uuid_x86.ipp, SSE2" )
|
||||
|
||||
#endif
|
||||
#endif // #if defined(BOOST_UUID_REPORT_IMPLEMENTATION)
|
||||
|
||||
// MSVC does not always have immintrin.h (at least, not up to MSVC 10), so include the appropriate header for each instruction set
|
||||
#if defined(BOOST_UUID_USE_AVX10_1)
|
||||
#include <immintrin.h>
|
||||
|
||||
@@ -13,12 +13,12 @@ find_package(Threads REQUIRED)
|
||||
|
||||
set(BOOST_TEST_LINK_LIBRARIES Boost::uuid Boost::core)
|
||||
|
||||
boost_test(TYPE run SOURCES test_uuid.cpp LINK_LIBRARIES Boost::container_hash)
|
||||
boost_test(TYPE run SOURCES test_uuid.cpp LINK_LIBRARIES Boost::container_hash COMPILE_DEFINITIONS BOOST_UUID_NO_SIMD=1 NAME test_uuid_no_simd)
|
||||
boost_test(TYPE run SOURCES test_uuid.cpp LINK_LIBRARIES Boost::container_hash COMPILE_DEFINITIONS BOOST_UUID_REPORT_IMPLEMENTATION=1)
|
||||
boost_test(TYPE run SOURCES test_uuid.cpp LINK_LIBRARIES Boost::container_hash COMPILE_DEFINITIONS BOOST_UUID_NO_SIMD=1 BOOST_UUID_REPORT_IMPLEMENTATION=1 NAME test_uuid_no_simd)
|
||||
boost_test(TYPE run SOURCES test_uuid_2.cpp)
|
||||
|
||||
boost_test(TYPE run SOURCES test_comparison.cpp)
|
||||
boost_test(TYPE run SOURCES test_comparison.cpp COMPILE_DEFINITIONS BOOST_UUID_NO_SIMD=1 NAME test_comparison_no_simd)
|
||||
boost_test(TYPE run SOURCES test_comparison.cpp COMPILE_DEFINITIONS BOOST_UUID_REPORT_IMPLEMENTATION=1)
|
||||
boost_test(TYPE run SOURCES test_comparison.cpp COMPILE_DEFINITIONS BOOST_UUID_NO_SIMD=1 BOOST_UUID_REPORT_IMPLEMENTATION=1 NAME test_comparison_no_simd)
|
||||
|
||||
boost_test(TYPE run SOURCES test_include1.cpp test_include2.cpp)
|
||||
|
||||
|
||||
@@ -64,14 +64,16 @@ run test_include1.cpp test_include2.cpp ;
|
||||
|
||||
# main test
|
||||
|
||||
run test_uuid.cpp ;
|
||||
run test_uuid.cpp : : : <define>BOOST_UUID_NO_SIMD : test_uuid_no_simd ;
|
||||
run test_uuid.cpp
|
||||
: : : <define>BOOST_UUID_REPORT_IMPLEMENTATION ;
|
||||
run test_uuid.cpp : : : <define>BOOST_UUID_NO_SIMD <define>BOOST_UUID_REPORT_IMPLEMENTATION : test_uuid_no_simd ;
|
||||
run test_uuid_2.cpp ;
|
||||
|
||||
# test comparison
|
||||
|
||||
run test_comparison.cpp ;
|
||||
run test_comparison.cpp : : : <define>BOOST_UUID_NO_SIMD : test_comparison_no_simd ;
|
||||
run test_comparison.cpp
|
||||
: : : <define>BOOST_UUID_REPORT_IMPLEMENTATION ;
|
||||
run test_comparison.cpp : : : <define>BOOST_UUID_NO_SIMD <define>BOOST_UUID_REPORT_IMPLEMENTATION : test_comparison_no_simd ;
|
||||
|
||||
# test uuid_io.hpp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user