Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #222 from igchor/stable-gcc-fix
Browse files Browse the repository at this point in the history
backport: Disable some libcxx tests for old g++ compilers.
  • Loading branch information
marcinslusarz authored Feb 19, 2019
2 parents 464e94e + d89e1c4 commit df69700
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
11 changes: 10 additions & 1 deletion tests/ctest_helpers.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2018, Intel Corporation
# Copyright 2018-2019, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -88,6 +88,15 @@ else()
set(NO_CHRONO_BUG TRUE)
endif()

set(CMAKE_REQUIRED_FLAGS "--std=c++${CMAKE_CXX_STANDARD} -c")
CHECK_CXX_SOURCE_COMPILES(
"#include <cstddef>
int main() {
std::max_align_t var;
return 0;
}"
MAX_ALIGN_TYPE_EXISTS)

set(CMAKE_REQUIRED_FLAGS ${SAVED_CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_INCLUDES ${SAVED_CMAKE_REQUIRED_INCLUDES})

Expand Down
20 changes: 13 additions & 7 deletions tests/external/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2018, Intel Corporation
# Copyright 2018-2019, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -86,8 +86,10 @@ add_test_default(array_indexing none)
build_test(array_max_size libcxx/array/max_size.pass.cpp)
add_test_default(array_max_size none)

build_test(array_size_and_alignment libcxx/array/size_and_alignment.pass.cpp)
add_test_default(array_size_and_alignment none)
if (MAX_ALIGN_TYPE_EXISTS)
build_test(array_size_and_alignment libcxx/array/size_and_alignment.pass.cpp)
add_test_default(array_size_and_alignment none)
endif()

build_test(array_types libcxx/array/types.pass.cpp)
add_test_default(array_types none)
Expand All @@ -107,11 +109,15 @@ add_test_default(array_cons_implicit_copy none)
build_test(array_initializer_list libcxx/array/array.cons/initializer_list.pass.cpp)
add_test_default(array_initializer_list none)

build_test(array_data_const libcxx/array/array.data/data_const.pass.cpp)
add_test_default(array_data_const none)
if (MAX_ALIGN_TYPE_EXISTS)
build_test(array_data_const libcxx/array/array.data/data_const.pass.cpp)
add_test_default(array_data_const none)
endif()

build_test(array_data libcxx/array/array.data/data.pass.cpp)
add_test_default(array_data none)
if (MAX_ALIGN_TYPE_EXISTS)
build_test(array_data libcxx/array/array.data/data.pass.cpp)
add_test_default(array_data none)
endif()

add_test_expect_failure(array_fill libcxx/array/array.fill/fill.fail.cpp)

Expand Down

0 comments on commit df69700

Please sign in to comment.