From 87bb121b470c0c44627b47bf76d4944d6971aab0 Mon Sep 17 00:00:00 2001 From: Silas Parker Date: Wed, 25 Apr 2018 16:56:23 +0800 Subject: [PATCH] cmake: avoid killing CMAKE_C_FLAGS https://github.com/warmcat/libwebsockets/issues/1252 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 517ea33a..df320e43 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -997,9 +997,9 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID endif() if (CMAKE_BUILD_TYPE MATCHES "DEBUG") - set(CMAKE_C_FLAGS "-O0" ${CMAKE_C_FLAGS}) + set(CMAKE_C_FLAGS "-O0 ${CMAKE_C_FLAGS}") else() - set(CMAKE_C_FLAGS "-O3" ${CMAKE_C_FLAGS}) + set(CMAKE_C_FLAGS "-O3 ${CMAKE_C_FLAGS}") endif() if (UNIX AND NOT LWS_WITH_ESP32)