commit 07b9e746b783c943842d7c3658e3b1384838066e parent 0121707f40e64b2ca509ed9184147e1929f212b2 Author: Christophe Coustet <christophe.coustet@meso-star.com> Date: Wed, 16 May 2018 15:40:02 +0200 Fix VC2017 warnings Diffstat:
| M | cmake/CMakeLists.txt | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -85,10 +85,18 @@ set_source_files_properties(${S2D_FILES_SRC} PROPERTIES LANGUAGE CXX) add_library(s2d SHARED ${S2D_FILES_SRC} ${S2D_FILES_INC} ${S2D_FILES_INC_API}) target_link_libraries(s2d RSys ${EMBREE_LIBRARY}) -if(CMAKE_COMPILER_IS_GNUCXX) +if(CMAKE_COMPILER_IS_GNUCC) target_link_libraries(s2d m) endif() +if(MSVC) + ### disable verbose warnings: + # warning C4127: conditional expression is constant + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4127") + # warning C4312: 'operation' : conversion from 'type1' to 'type2' of greater size + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4312") +endif() + set_target_properties(s2d PROPERTIES DEFINE_SYMBOL S2D_SHARED_BUILD LINKER_LANGUAGE CXX