From 6464455322874a7bbd4ec01517183e80a237c7c0 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Thu, 25 Nov 2021 12:07:50 +0800 Subject: [PATCH] Preserve C++ build flags passed to cmake This lets distros apply extra hardening flags, while keeping the supplied C++ build flags. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cebc142..a7a9f8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.0) option(RAW_VALUES_DEC "Display Raw Values in Decimal instead of Hex" OFF) project(CrazyDiskInfo CXX) add_executable(CrazyDiskInfo main.cpp) -set(CMAKE_CXX_FLAGS "-Wall -std=c++11") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") SET_TARGET_PROPERTIES(CrazyDiskInfo PROPERTIES OUTPUT_NAME crazy) target_link_libraries(CrazyDiskInfo atasmart) target_link_libraries(CrazyDiskInfo tinfow)