remove MSVC warning

This commit is contained in:
Eyck Jentzsch 2021-10-10 19:56:33 +02:00
parent f0ada1ba8c
commit c8679fca85
2 changed files with 9 additions and 7 deletions

View File

@ -54,12 +54,14 @@ if(TARGET ${CORE_NAME}_cpp)
add_dependencies(${PROJECT_NAME} ${CORE_NAME}_cpp) add_dependencies(${PROJECT_NAME} ${CORE_NAME}_cpp)
endif() 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) 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() endif()
target_include_directories(${PROJECT_NAME} PUBLIC incl) target_include_directories(${PROJECT_NAME} PUBLIC incl)
target_link_libraries(${PROJECT_NAME} PUBLIC softfloat scc-util jsoncpp) 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) target_link_libraries(${PROJECT_NAME} PUBLIC -Wl,--whole-archive dbt-core -Wl,--no-whole-archive)
else() else()
target_link_libraries(${PROJECT_NAME} PUBLIC dbt-core) target_link_libraries(${PROJECT_NAME} PUBLIC dbt-core)

View File

@ -30,21 +30,21 @@
* *
*******************************************************************************/ *******************************************************************************/
// clang-format off // clang-format off
#include <iss/debugger/gdb_session.h> #include <iss/debugger/gdb_session.h>
#include <iss/debugger/server.h> #include <iss/debugger/server.h>
#include <iss/iss.h> #include <iss/iss.h>
#include <iss/arch/tgc_c.h> #include <iss/arch/tgc_c.h>
#include <iss/arch/riscv_hart_m_p.h> #include <iss/arch/riscv_hart_m_p.h>
#include <iss/interp/vm_base.h> #include <iss/interp/vm_base.h>
#include "../fp_functions.h" #include "../fp_functions.h"
#include <util/logging.h> #include <util/logging.h>
#include <sstream> #include <sstream>
#include <fmt/format.h> #include <fmt/format.h>
#include <array> #include <array>
#include <iss/debugger/riscv_target_adapter.h> #include <iss/debugger/riscv_target_adapter.h>
// clang-format on // clang-format on
namespace iss { namespace iss {
namespace interp { namespace interp {