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)