From 8c6963d7ed2e2e6c0e20912555f400b17abe45ab Mon Sep 17 00:00:00 2001 From: Koji KITAYAMA <45088311+kkitayam@users.noreply.github.com> Date: Mon, 17 Oct 2022 07:22:06 +0900 Subject: [PATCH] Fix compile errors when building with clang x86_64-pc-windows-msvc (#1038) --- tools/pioasm/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/pioasm/CMakeLists.txt b/tools/pioasm/CMakeLists.txt index df80530..322408a 100644 --- a/tools/pioasm/CMakeLists.txt +++ b/tools/pioasm/CMakeLists.txt @@ -36,8 +36,11 @@ endif() target_include_directories(pioasm PRIVATE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/gen) -if (MSVC) +if (MSVC OR + (WIN32 AND NOT MINGW AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))) target_compile_definitions(pioasm PRIVATE YY_NO_UNISTD_H) +endif() +if (MSVC) target_compile_options(pioasm PRIVATE "/std:c++latest") endif()