From: Maksym Mamontov Date: Tue, 28 Jan 2020 17:31:40 +0000 (+0200) Subject: Target-specific, compiler-aware warnings. X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/02b5dcd27ece461f9dbe122771c4b740dd909d67?ds=sidebyside Target-specific, compiler-aware warnings. --- 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 )