Fixed building on macos

This commit is contained in:
Bartek Kryza
2024-01-11 15:22:09 +01:00
parent fb2edd51aa
commit 555d0da4f6
3 changed files with 14 additions and 1 deletions

View File

@@ -17,8 +17,10 @@
*/
#pragma once
#include <map>
#include <string>
#include <utility>
#include <vector>
namespace clanguml {
namespace config {

View File

@@ -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 <coroutine> header is not available
list(FILTER TEST_CASE_SOURCES
EXCLUDE
REGEX ".*t00069.*")
endif(APPLE)
set(TEST_NAMES
test_util
test_model

View File

@@ -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(<coroutine>)
#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();
}
}