From 02b5dcd27ece461f9dbe122771c4b740dd909d67 Mon Sep 17 00:00:00 2001 From: Maksym Mamontov Date: Tue, 28 Jan 2020 19:31:40 +0200 Subject: [PATCH 1/1] Target-specific, compiler-aware warnings. --- libs/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 8528b951..17b90799 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -29,9 +29,9 @@ if ( BUILD_LIB_IA ) endif ( BUILD_LIB_IA ) if ( BUILD_LIB_IBPP ) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-old-style-cast -Wno-useless-cast") add_library ( ibpp STATIC ibpp/all_in_one.cpp ) target_include_directories ( ibpp PUBLIC ibpp/include ) + target_compile_options ( ibpp PRIVATE -Wno-old-style-cast $<$:-Wno-useless-cast> ) endif ( BUILD_LIB_IBPP ) if ( BUILD_LIB_JSON ) -- 2.44.2