From c8679fca8550f513bb3dfb9bd67d1d1739735af0 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Sun, 10 Oct 2021 19:56:33 +0200 Subject: [PATCH] remove MSVC warning --- CMakeLists.txt | 6 ++++-- src/vm/interp/vm_tgc_c.cpp | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5878425..5098982 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,12 +54,14 @@ if(TARGET ${CORE_NAME}_cpp) add_dependencies(${PROJECT_NAME} ${CORE_NAME}_cpp) endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") target_compile_options(${PROJECT_NAME} PRIVATE -Wno-shift-count-overflow) +elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + target_compile_options(${PROJECT_NAME} PRIVATE /wd4293) endif() target_include_directories(${PROJECT_NAME} PUBLIC incl) target_link_libraries(${PROJECT_NAME} PUBLIC softfloat scc-util jsoncpp) -if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") target_link_libraries(${PROJECT_NAME} PUBLIC -Wl,--whole-archive dbt-core -Wl,--no-whole-archive) else() target_link_libraries(${PROJECT_NAME} PUBLIC dbt-core) diff --git a/src/vm/interp/vm_tgc_c.cpp b/src/vm/interp/vm_tgc_c.cpp index a61fb17..70420ea 100644 --- a/src/vm/interp/vm_tgc_c.cpp +++ b/src/vm/interp/vm_tgc_c.cpp @@ -30,21 +30,21 @@ * *******************************************************************************/ -// clang-format off +// clang-format off #include #include #include -#include -#include +#include +#include #include -#include "../fp_functions.h" +#include "../fp_functions.h" #include #include #include #include #include -// clang-format on +// clang-format on namespace iss { namespace interp {