From cba3ae4849f9b2c224cf615d6b5f1907d9177c29 Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Sat, 8 Jul 2017 13:48:16 -0700 Subject: [PATCH] use target_* commands to configure msvc --- CMakeLists.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4feb66cce..0a7a351cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -327,15 +327,12 @@ else() endif() if (MSVC) -# disable bogus deprecation warnings on msvc8 - add_definitions(-D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE) -# these compiler settings just makes the compiler standard conforming - add_definitions(/Zc:wchar_t /Zc:forScope) -# for multi-core compilation - add_definitions(/MP) - -#$(SolutionDir)msvc,release:/OPT:ICF=5 -#$(SolutionDir)msvc,release:/OPT:REF + # disable bogus deprecation warnings on msvc8 + target_compile_definitions(torrent-rasterbar PUBLIC _SCL_SECURE_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE) + # these compiler settings just make the compiler standard conforming + target_compile_options(torrent-rasterbar PUBLIC /Zc:wchar_t /Zc:forScope) + # for multi-core compilation + target_compile_options(torrent-rasterbar PUBLIC /MP) endif() target_compile_definitions(torrent-rasterbar PUBLIC _FILE_OFFSET_BITS=64)