diff --git a/MagickWand/CMakeLists.txt b/MagickWand/CMakeLists.txt index 3f2a4189703..35b40a1cc5c 100644 --- a/MagickWand/CMakeLists.txt +++ b/MagickWand/CMakeLists.txt @@ -104,7 +104,7 @@ endif() if(MSVC) # for [[fallthrough]] - add_compile_options(/std:clatest) + target_compile_options(${MAGICKWAND_BINARY_NAME} PRIVATE /std:clatest) endif() set_target_properties(${MAGICKWAND_BINARY_NAME} PROPERTIES PUBLIC_HEADER "${MAGICKWAND_PUBLIC_HEADERS}")