diff --git a/src/config/option.h b/src/config/option.h index 699e3e59..8e6e9076 100644 --- a/src/config/option.h +++ b/src/config/option.h @@ -17,8 +17,10 @@ */ #pragma once +#include #include #include +#include namespace clanguml { namespace config { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 594857ad..2e71d867 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -39,6 +39,8 @@ endif(MSVC) list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_std_20 SUPPORTS_CXX_STD_20) +message(STATUS "Enabling C++20 test cases") + # Remove test cases which require C++20 if they are not supported here if(SUPPORTS_CXX_STD_20 EQUAL -1 OR ${LLVM_PACKAGE_VERSION} VERSION_LESS "14.0") @@ -55,6 +57,13 @@ else() set(ENABLE_CXX_STD_20_TEST_CASES 1) endif() +if(APPLE) + # On Apple Clang header is not available + list(FILTER TEST_CASE_SOURCES + EXCLUDE + REGEX ".*t00069.*") +endif(APPLE) + set(TEST_NAMES test_util test_model diff --git a/tests/test_cases.cc b/tests/test_cases.cc index 260730d5..93a02baa 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -405,8 +405,10 @@ using namespace clanguml::test::matchers; #include "t00067/test_case.h" #include "t00068/test_case.h" #if defined(ENABLE_CXX_STD_20_TEST_CASES) +#if __has_include() #include "t00069/test_case.h" #endif +#endif #if defined(ENABLE_CXX_MODULES_TEST_CASES) #include "t00070/test_case.h" #include "t00071/test_case.h" @@ -523,4 +525,4 @@ int main(int argc, char *argv[]) clih.handle_options(argvv.size(), argvv.data()); return session.run(); -} \ No newline at end of file +}