From ddc5661a38337a0c775aac09d4c006b001c9f4bd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 25 Aug 2019 04:28:25 -0400 Subject: [PATCH] CMakeLists: Migrate off directly modifying CMAKE_CXX_FLAGS We can just use add_compile_options to append the compilation flag to the directory property. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b17cf68..a5c85f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing") + add_compile_options(-Wno-narrowing) endif() if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/boo AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/athena)