diff --git a/Wrapping/macro_files/itk_end_wrap_module.cmake b/Wrapping/macro_files/itk_end_wrap_module.cmake index 04bde56dc4b..bddf23a4d2a 100644 --- a/Wrapping/macro_files/itk_end_wrap_module.cmake +++ b/Wrapping/macro_files/itk_end_wrap_module.cmake @@ -529,11 +529,12 @@ ${DO_NOT_WAIT_FOR_THREADS_CALLS} if(MSVC) # /wd4244: Disables 'conversion from 'type1' to 'type2', possible loss of data warnings # /wd4996: Disables deprecated declaration warnings in generated wrapper code + # /Zc:__cplusplus: Make MSVC correctly report __cplusplus version set_target_properties( ${lib} PROPERTIES COMPILE_FLAGS - "/wd4244 /wd4996" + "/wd4244 /wd4996 /Zc:__cplusplus" ) endif() target_link_directories(${lib} PUBLIC ${Python3_LIBRARY_DIRS})