]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Remove CMake custom compiler flags for RELEASE and DEBUG build
authorArne Schwabe <arne@rfc2549.org>
Tue, 7 Nov 2023 14:17:55 +0000 (15:17 +0100)
committerGert Doering <gert@greenie.muc.de>
Thu, 9 Nov 2023 11:36:24 +0000 (12:36 +0100)
This overwrites the default that cmake automatically sets. In the
case of debug builds, this breaks debugging as -O1 already optimises
many variables away.

Change-Id: I3ca6965799b23d542ababc3e38880317cb46a3ac
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20231107141755.30559-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/search?l=mid&q=20231107141755.30559-1-frank@lichtenheld.com
Signed-off-by: Gert Doering <gert@greenie.muc.de>
CMakeLists.txt

index 376a06091106e41375fcffc5d882bd17b86c75fd..d21c9bdf3f1521d1c878277298380726667e0ed7 100644 (file)
@@ -79,10 +79,6 @@ if (MSVC)
         add_link_options("$<$<CONFIG:Release>:/CETCOMPAT>")
     endif()
 else ()
-    set(CMAKE_C_FLAGS_RELEASE "-O2")
-    set(CMAKE_CXX_FLAGS_RELEASE "-O2")
-    set(CMAKE_C_FLAGS_DEBUG "-g -O1")
-    set(CMAKE_CXX_FLAGS_DEBUG "-g -O1")
     add_compile_options(-Wall -Wuninitialized)
     check_c_compiler_flag(-Wno-stringop-truncation NoStringOpTruncation)