Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6e14708
Switching to another branch commit
cbezault Apr 12, 2020
6adb713
clean swp files
cbezault Apr 12, 2020
6465ad5
delete a data file
cbezault Apr 12, 2020
bfe1b94
Merge branch 'master' of github.com:microsoft/STL into cmake-test-bac…
cbezault Apr 20, 2020
85cb65b
Get tr1 to test with ctest and Ninja
cbezault Apr 22, 2020
9c3c5e4
Some fixes
cbezault Apr 22, 2020
29c490a
Merge branch 'master' of github.com:microsoft/STL into cmake-test-bac…
cbezault Apr 22, 2020
edb5e36
Temporary yvals change
cbezault Apr 22, 2020
e8d01a1
Resolve warning in algorithm
cbezault Apr 23, 2020
b6fd0b2
Resolve warning in random
cbezault Apr 23, 2020
7c55266
Resolve warning in tfuns
cbezault Apr 23, 2020
1aa37d8
Another sign mismatch fix in algorithm
cbezault Apr 23, 2020
90c0aaf
Another sign mismatch fix in random
cbezault Apr 23, 2020
b2eae2a
More fixes in random
cbezault Apr 23, 2020
c76ff85
fixup
cbezault Apr 23, 2020
a3cbdff
Add a default copy constructor to avoid deprecation warning
cbezault Apr 23, 2020
3e563be
default copy assignment in tuple
cbezault Apr 23, 2020
9861a93
WIP
cbezault Apr 23, 2020
4e18902
WIP
cbezault Apr 23, 2020
ee300ce
Make _Raise [[noreturn]]
cbezault Apr 23, 2020
1a2af38
Make _HAS_EXCEPTIONS=0 terminate call _CSTD abort()
cbezault Apr 23, 2020
7811ae5
Don't override /Od with /O2
cbezault Apr 23, 2020
887d37b
fixups for custom formats
cbezault Apr 23, 2020
0bc36e0
Another fixup
cbezault Apr 23, 2020
6184fdc
Fixup output files
cbezault Apr 23, 2020
c25d001
fixup charconv env.lst
cbezault Apr 23, 2020
28a8b8e
Suppress deprecation warnings
cbezault Apr 23, 2020
d9829e2
Rever test change
cbezault Apr 23, 2020
84370c5
Suppress volatile deprecation warning in type_traits
cbezault Apr 23, 2020
0c21111
Fixup bad sign compare in cvt/one_one
cbezault Apr 23, 2020
5bd08d6
Suppress volatile deprecation warning
cbezault Apr 23, 2020
05e4d9a
Fix VSO-609129 and provide test coverage
cbezault Apr 24, 2020
e48ddaa
Silence warnings in xutility
cbezault Apr 24, 2020
bb447f6
silence warnings in yvals.h
cbezault Apr 24, 2020
389e857
Silence warning in memchr opt test
cbezault Apr 24, 2020
f344463
Don't set LIB, LIBPATH or INCLUDE for tests
cbezault Apr 24, 2020
1b25e55
Silence warning in include each header alone test
cbezault Apr 24, 2020
358d6c7
Move to test type overrides
cbezault Apr 24, 2020
ee74553
Silence warning in execution
cbezault Apr 24, 2020
5186704
More fixups
cbezault Apr 25, 2020
665ab8f
fixups
cbezault Apr 25, 2020
caebb8a
fixups
cbezault Apr 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stl/inc/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct _Optimistic_temporary_buffer { // temporary storage with _alloca-like att
}

const pair<_Ty*, ptrdiff_t> _Raw = _Get_temporary_buffer<_Ty>(_Attempt);
if (_Raw.second > _Optimistic_count) { // engage heap space
if (static_cast<size_t>(_Raw.second) > _Optimistic_count) { // engage heap space
_Data = _Raw.first;
_Capacity = _Raw.second;
return;
Expand All @@ -62,7 +62,7 @@ struct _Optimistic_temporary_buffer { // temporary storage with _alloca-like att
_Optimistic_temporary_buffer& operator=(const _Optimistic_temporary_buffer&) = delete;

~_Optimistic_temporary_buffer() noexcept {
if (_Capacity > _Optimistic_count) {
if (static_cast<size_t>(_Capacity) > _Optimistic_count) {
_Return_temporary_buffer(_Data);
}
}
Expand Down
6 changes: 4 additions & 2 deletions stl/inc/cvt/one_one
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ namespace stdext {
_Mid1 = _First1;
_Mid2 = _First2;

while (_Bytes_per_word <= _Last1 - _Mid1 && _Mid2 != _Last2) { // convert a multibyte sequence
while (_Bytes_per_word <= static_cast<size_t>(_Last1 - _Mid1) && _Mid2 != _Last2) {
// convert a multibyte sequence
const auto _Ptr = reinterpret_cast<const unsigned char*>(_Mid1);
unsigned long _Ch = 0;

Expand Down Expand Up @@ -147,7 +148,8 @@ namespace stdext {
}
}

while (_Mid1 != _Last1 && _Bytes_per_word <= _Last2 - _Mid2) { // convert and put a wide char
while (_Mid1 != _Last1 && _Bytes_per_word <= static_cast<size_t>(_Last2 - _Mid2)) {
// convert and put a wide char
unsigned long _Ch = static_cast<unsigned long>(*_Mid1++);

if (_Maxcode < _Ch) {
Expand Down
2 changes: 1 addition & 1 deletion stl/inc/cvt/sjis_0208
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace stdext {
// convert 2-byte code
unsigned char _By2 = static_cast<unsigned char>(*++_Mid1);

if ((_By2 < 0x40 || 0x7e < _By2) && (_By2 < 0x80 && 0xfc < _By2)) { // TRANSITION, VSO-609129
if (_By2 < 0x40 || _By2 == 0x7f || _By2 > 0xfc) {
return _Mybase::error; // bad second byte
}

Expand Down
5 changes: 3 additions & 2 deletions stl/inc/exception
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public:
return _Ptr ? _Ptr : "unknown exception";
}

void __CLR_OR_THIS_CALL _Raise() const { // raise the exception
[[noreturn]] void __CLR_OR_THIS_CALL _Raise() const { // raise the exception
if (_STD _Raise_handler) {
(*_STD _Raise_handler)(*this); // call raise handler if present
}
Expand Down Expand Up @@ -171,7 +171,8 @@ inline terminate_handler __CRTDECL set_terminate(terminate_handler) noexcept { /
return nullptr;
}

inline void __CRTDECL terminate() noexcept { // handle exception termination
[[noreturn]] inline void __CRTDECL terminate() noexcept { // handle exception termination
_CSTD abort();
}

_NODISCARD inline terminate_handler __CRTDECL get_terminate() noexcept { // get current terminate handler
Expand Down
4 changes: 2 additions & 2 deletions stl/inc/execution
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,8 @@ struct _Static_partition_team { // common data for all static partitioned ops
_Diff _Unchunked_items;

_Static_partition_team(const _Diff _Count_, const size_t _Chunks_)
: _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, _Chunk_size{_Count_ / static_cast<_Diff>(_Chunks_)},
_Unchunked_items{_Count_ % static_cast<_Diff>(_Chunks_)} {
: _Consumed_chunks{0}, _Chunks{_Chunks_}, _Count{_Count_}, _Chunk_size{static_cast<_Diff>(_Count_ / static_cast<_Diff>(_Chunks_))},
_Unchunked_items{static_cast<_Diff>(_Count_ % static_cast<_Diff>(_Chunks_))} {
// Calculate common data for statically partitioning iterator ranges.
// pre: _Count_ >= _Chunks_ && _Chunks_ >= 1
}
Expand Down
30 changes: 15 additions & 15 deletions stl/inc/random
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ private:
// CLASS TEMPLATE _Circ_buf FOR subtract_with_carry, subtract_with_carry_01, AND mersenne_twister
template <class _Ty, size_t _Nw>
struct _Circ_buf { // holds historical values for generators
_Ty _At(int _Ix) const {
_Ty _At(size_t _Ix) const {
return _Ax[_Base(_Ix)];
}

Expand Down Expand Up @@ -637,7 +637,7 @@ struct _Circ_buf { // holds historical values for generators
return true;
}

unsigned int _Base(int _Ix = 0) const {
size_t _Base(size_t _Ix = 0) const {
return (_Ix += _Idx) < _Nw ? (_Ix + _Nw) : (_Ix - _Nw);
}

Expand Down Expand Up @@ -736,7 +736,7 @@ protected:
this->_Idx = _Rx;
}

void _Setx(unsigned int _Ix, _Ty _Xis, _Ty _Xir) { // update _Ax[_Ix] and _Carry
void _Setx(size_t _Ix, _Ty _Xis, _Ty _Xir) { // update _Ax[_Ix] and _Carry
bool _Underflowed = false;
_Ty _Newx = _Xis;
if (_Newx < _Xir) {
Expand Down Expand Up @@ -827,7 +827,7 @@ struct _Swc_traits { // traits for subtract_with_carry generator
// otherwise compute from last value
int _Kx = _Get_wc();

for (int _Ix = 0; _Ix < _Nw; ++_Ix) { // pack _Kx words
for (size_t _Ix = 0; _Ix < _Nw; ++_Ix) { // pack _Kx words
_Ax[_Ix] = _Gx();
for (int _Jx = 1; _Jx < _Kx; ++_Jx) {
_Ax[_Ix] |= static_cast<_Ty>(_Gx()) << (32 * _Jx);
Expand All @@ -846,7 +846,7 @@ struct _Swc_traits { // traits for subtract_with_carry generator
#pragma warning(disable : 4724) // potential mod by 0
static _Cy_t _Reduce(_Ty* _Ax) { // reduce values to allowed range
if _CONSTEXPR_IF (_Mx != 0) {
for (int _Ix = 0; _Ix < _Nw; ++_Ix) {
for (size_t _Ix = 0; _Ix < _Nw; ++_Ix) {
_Ax[_Ix] = _Ax[_Ix] % _Mx;
}
}
Expand All @@ -860,7 +860,7 @@ struct _Swc_traits { // traits for subtract_with_carry generator
basic_ostream<_Elem, _Traits>& _Ostr, const _Circ_buf<_Ty, _Nw>& _Buf, _Cy_t _Cy) { // write state to _Ostr
int _Kx = _Get_wc();

for (int _Ix = 0; _Ix < _Nw; ++_Ix) {
for (size_t _Ix = 0; _Ix < _Nw; ++_Ix) {
for (int _Jx = 1; _Jx <= _Kx; ++_Jx) { // unpack into _Kx words
unsigned int _Word = static_cast<unsigned int>(_Buf._At(_Ix) >> ((_Kx - _Jx) * 32));
_Ostr << _Word << ' ';
Expand Down Expand Up @@ -931,8 +931,8 @@ public:
unsigned long _Arr[_Kx * _Rx];
_Seq.generate(&_Arr[0], &_Arr[_Kx * _Rx]);

int _Idx0 = 0;
for (int _Ix = 0; _Ix < _Rx; ++_Ix, _Idx0 += _Kx) { // pack _Kx words
size_t _Idx0 = 0;
for (size_t _Ix = 0; _Ix < _Rx; ++_Ix, _Idx0 += _Kx) { // pack _Kx words
this->_Ax[_Ix] = _Arr[_Idx0];
for (int _Jx = 1; _Jx < _Kx; ++_Jx) {
this->_Ax[_Ix] |= static_cast<_Ty>(_Arr[_Idx0 + _Jx]) << (32 * _Jx);
Expand Down Expand Up @@ -975,7 +975,7 @@ struct _Swc_01_traits { // traits for subtract_with_carry_01 generator
static _Cy_t _Reset(_Gen& _Gx, _Ty* _Ax, bool _Readcy) { // set initial values of _Ax from generator _Gx
// return value of _Cy from range if _Readcy is true,
// otherwise from last value
for (int _Ix = 0; _Ix < _Rx; ++_Ix) { // read values
for (size_t _Ix = 0; _Ix < _Rx; ++_Ix) { // read values
_Ty _Factor = 1;
_Ty _Val = 0;
for (int _Jx = 0; _Jx < _Nwords - 1; ++_Jx) { // read components of value
Expand All @@ -996,7 +996,7 @@ struct _Swc_01_traits { // traits for subtract_with_carry_01 generator
template <class _Elem, class _Traits>
static void _Write(
basic_ostream<_Elem, _Traits>& _Ostr, const _Circ_buf<_Ty, _Rx>& _Buf, _Cy_t _Cy) { // write state to _Ostr
for (int _Ix = 0; _Ix < _Rx; ++_Ix) { // write values
for (size_t _Ix = 0; _Ix < _Rx; ++_Ix) { // write values
_Ty _Val = _Buf._At(_Ix);
unsigned long _Temp;
for (int _Jx = 0; _Jx < _Nwords - 1; ++_Jx) { // write components of value
Expand Down Expand Up @@ -1090,7 +1090,7 @@ public:
void seed(_Ty _X0 = default_seed, _Ty _Fx = static_cast<_Ty>(1812433253)) {
// set initial values from specified value
_Ty _Prev = this->_Ax[0] = _X0 & _WMSK;
for (int _Ix = 1; _Ix < _Nx; ++_Ix) {
for (size_t _Ix = 1; _Ix < _Nx; ++_Ix) {
_Prev = this->_Ax[_Ix] = (_Ix + _Fx * (_Prev ^ (_Prev >> (_Wx - 2)))) & _WMSK;
}

Expand All @@ -1099,7 +1099,7 @@ public:

template <class _Gen, _Enable_if_seed_seq_t<_Gen, mersenne_twister> = 0>
void seed(_Gen& _Gx, bool = false) { // set initial values from range
for (int _Ix = 0; _Ix < _Nx; ++_Ix) {
for (size_t _Ix = 0; _Ix < _Nx; ++_Ix) {
this->_Ax[_Ix] = _Gx() & _WMSK;
}

Expand All @@ -1108,7 +1108,7 @@ public:

template <class _Elem, class _S_Traits>
basic_ostream<_Elem, _S_Traits>& _Write(basic_ostream<_Elem, _S_Traits>& _Ostr) const { // write state to _Ostr
for (int _Ix = 0; _Ix < _Nx; ++_Ix) {
for (size_t _Ix = 0; _Ix < _Nx; ++_Ix) {
_Ostr << this->_At(_Ix) << ' ';
}

Expand Down Expand Up @@ -1148,7 +1148,7 @@ protected:
_Post_satisfies_(this->_Idx == 0)

void _Refill_lower() { // compute values for the lower half of the history array
int _Ix;
size_t _Ix;
for (_Ix = 0; _Ix < _Nx - _Mx; ++_Ix) { // fill in lower region
_Ty _Tmp = (this->_Ax[_Ix + _Nx] & _HMSK) | (this->_Ax[_Ix + _Nx + 1] & _LMSK);
this->_Ax[_Ix] = (_Tmp >> 1) ^ (_Tmp & 1 ? _Px : 0) ^ this->_Ax[_Ix + _Nx + _Mx];
Expand All @@ -1165,7 +1165,7 @@ protected:
}

void _Refill_upper() { // compute values for the upper half of the history array
int _Ix;
size_t _Ix;
for (_Ix = _Nx; _Ix < 2 * _Nx; ++_Ix) { // fill in values
_Ty _Tmp = (this->_Ax[_Ix - _Nx] & _HMSK) | (this->_Ax[_Ix - _Nx + 1] & _LMSK);
this->_Ax[_Ix] = (_Tmp >> 1) ^ (_Tmp & 1 ? _Px : 0) ^ this->_Ax[_Ix - _Nx + _Mx];
Expand Down
2 changes: 2 additions & 0 deletions stl/inc/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ public:

constexpr tuple(const tuple&) noexcept /* strengthened */ {} // TRANSITION, ABI: should be defaulted

constexpr tuple& operator=(const tuple&) = default;

template <class _Alloc>
tuple(allocator_arg_t, const _Alloc&) noexcept /* strengthened */ {}

Expand Down
17 changes: 17 additions & 0 deletions stl/inc/type_traits
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,12 @@ struct is_trivially_destructible : bool_constant<__is_trivially_destructible(_Ty
template <class _Ty>
_INLINE_VAR constexpr bool is_trivially_destructible_v = __is_trivially_destructible(_Ty);


#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-volatile"
#endif

// NOTHROW TRAITS
// STRUCT TEMPLATE is_nothrow_constructible
template <class _Ty, class... _Args>
Expand Down Expand Up @@ -1665,6 +1671,12 @@ struct _Invoker_ret<_Unforced, false> { // selected for _Rx being _Unforced
#pragma warning(disable : 4244) // 'argument': conversion from '_From' to '_To', possible loss of data
#pragma warning(disable : 4365) // 'argument': conversion from '_From' to '_To', signed/unsigned mismatch (/Wall)
#pragma warning(disable : 5215) // '%s' a function parameter with a volatile qualified type is deprecated in C++20

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-volatile"
#endif

template <class _To>
void _Implicitly_convert_to(_To) noexcept; // not defined

Expand Down Expand Up @@ -2360,5 +2372,10 @@ _STD_END
_STL_RESTORE_CLANG_WARNINGS
#pragma warning(pop)
#pragma pack(pop)

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#endif // _STL_COMPILER_PREPROCESSOR
#endif // _TYPE_TRAITS_
2 changes: 2 additions & 0 deletions stl/inc/vector
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,8 @@ class _Vb_reference : public _Vb_iter_base<_Alvbase_wrapped> {
_Vb_reference() = default;

public:
_Vb_reference(const _Vb_reference&) = default;

_Vb_reference(const _Mybase& _Right) noexcept : _Mybase(_Right._Myptr, _Right._Myoff, _Right._Getcont()) {}

_Vb_reference& operator=(const _Vb_reference& _Right) noexcept {
Expand Down
3 changes: 2 additions & 1 deletion stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -4941,7 +4941,8 @@ _NODISCARD _CONSTEXPR20 _InIt _Find_unchecked1(_InIt _First, const _InIt _Last,

#ifdef __cpp_lib_is_constant_evaluated
if (_STD is_constant_evaluated()) {
return _Find_unchecked1(_First, _Last, _Val, false_type{});
using _Elem = remove_pointer_t<_InIt>;
return _Find_unchecked1(_First, _Last, static_cast<_Elem>(_Val), false_type{});
}
#endif // __cpp_lib_is_constant_evaluated
_First =
Expand Down
15 changes: 15 additions & 0 deletions stl/inc/yvals.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,20 @@ _STL_DISABLE_CLANG_WARNINGS
_CRT_SECURE_INVALID_PARAMETER(mesg); \
} while (false)

#ifdef __clang__
#define _STL_VERIFY(cond, mesg) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wassume\"") \
do { \
if (cond) { /* contextually convertible to bool paranoia */ \
} else { \
_STL_REPORT_ERROR(mesg); \
} \
\
_Analysis_assume_(cond); \
} while (false) \
_Pragma("clang diagnostic pop")
#else // ^^^ clang // msvc vvv
#define _STL_VERIFY(cond, mesg) \
do { \
if (cond) { /* contextually convertible to bool paranoia */ \
Expand All @@ -193,6 +207,7 @@ _STL_DISABLE_CLANG_WARNINGS
\
_Analysis_assume_(cond); \
} while (false)
#endif // msvc

#ifdef _DEBUG
#define _STL_ASSERT(cond, mesg) _STL_VERIFY(cond, mesg)
Expand Down
3 changes: 2 additions & 1 deletion stl/inc/yvals_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@
_Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \
_Pragma("clang diagnostic ignored \"-Wignored-attributes\"") \
_Pragma("clang diagnostic ignored \"-Wuser-defined-literals\"") \
_Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"")
_Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") \
_Pragma("clang diagnostic ignored \"-Wc++20-extensions\"")
// clang-format on
#else // __clang__
#define _STL_DISABLE_CLANG_WARNINGS
Expand Down
31 changes: 26 additions & 5 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,36 @@ set(LIBCXX_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/libcxx" CACHE PATH
set(LLVM_SOURCE_DIR "${LLVM_PROJECT_SOURCE_DIR}/llvm" CACHE PATH
"Location of the llvm source tree")

set(STL_LIT ${CMAKE_CURRENT_BINARY_DIR}/utils/stl-lit/stl-lit.py)

set(Python_FIND_STRATEGY VERSION)
find_package(Python3)

add_subdirectory(libcxx)
add_subdirectory(std)
add_subdirectory(tr1)

set(STL_LIT ${CMAKE_CURRENT_BINARY_DIR}/utils/stl-lit/stl-lit.py)
# Add the stl-lit subdirectory last so all the test directories have had a
# chance to add to the config map.
add_subdirectory(utils/stl-lit)

set(Python_FIND_STRATEGY VERSION)
find_package(Python3)

execute_process(
COMMAND ${Python3_EXECUTABLE}
${STL_LIT}
"${LIBCXX_SOURCE_DIR}/test/std"
"${CMAKE_CURRENT_SOURCE_DIR}/std"
"${CMAKE_CURRENT_SOURCE_DIR}/tr1")

include("${CMAKE_CURRENT_BINARY_DIR}/libcxx/tests.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/std/tests.cmake")
include("${CMAKE_CURRENT_BINARY_DIR}/tr1/tests.cmake")

get_property(STL_LIT_GENERATED_FILES GLOBAL PROPERTY STL_LIT_GENERATED_FILES)

#add_custom_target(
# generate_test_files
# ${Python3_EXECUTABLE}
# ${STL_LIT}
# #"${LIBCXX_SOURCE_DIR}/test/std"
# #"${CMAKE_CURRENT_SOURCE_DIR}/std"
# "${CMAKE_CURRENT_SOURCE_DIR}/tr1"
# BYPRODUCTS ${STL_LIT_GENERATED_FILES})
14 changes: 1 addition & 13 deletions tests/libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

set(LIBCXX_ENVLST "${CMAKE_CURRENT_SOURCE_DIR}/usual_matrix.lst")
set(LIBCXX_EXPECTED_RESULTS "${CMAKE_CURRENT_SOURCE_DIR}/expected_results.txt")
set(LIBCXX_TEST_OUTPUT_DIR "${STL_TEST_OUTPUT_DIR}/libcxx")
set(LIBCXX_TEST_TYPE_OVERRIDES "${CMAKE_CURRENT_SOURCE_DIR}/test_type_overrides.txt")

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
Expand All @@ -12,15 +12,3 @@ configure_file(
get_property(STL_LIT_CONFIG_MAP GLOBAL PROPERTY STL_LIT_CONFIG_MAP)
string(APPEND STL_LIT_CONFIG_MAP "map_config(\"${LIBCXX_SOURCE_DIR}/test/lit.cfg\", \"${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg\")\n")
set_property(GLOBAL PROPERTY STL_LIT_CONFIG_MAP ${STL_LIT_CONFIG_MAP})

if(ENABLE_XUNIT_OUTPUT)
list(APPEND LIBCXX_ADDITIONAL_LIT_FLAGS "--xunit-xml-output" "${CMAKE_CURRENT_BINARY_DIR}/libcxx.test.xml")
endif()

list(APPEND LIBCXX_STL_LIT_COMMAND "${STL_LIT}"
"${ADDITIONAL_LIT_FLAGS}"
"${LIBCXX_ADDITIONAL_LIT_FLAGS}"
"${LIBCXX_SOURCE_DIR}/test")

add_test(NAME libcxx COMMAND ${Python3_EXECUTABLE} ${LIBCXX_STL_LIT_COMMAND} COMMAND_EXPAND_LISTS)
set_tests_properties(libcxx PROPERTIES RUN_SERIAL TRUE)
Loading