gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / snappy-add-O2-flag-in-CmakeLists.txt.patch
CommitLineData
16de7f15
TGR
1From: Tobias Geerinckx-Rice <me@tobias.gr>
2Date: Sun, 26 Aug 2018 17:24:42 +0200
3Subject: [PATCH] snappy: Add O2 flag in CmakeLists.txt.
4
5Use ‘-O2’ optimisation when building with CMake, as is already done when
6using the Makefile. This patch was copied verbatim from the Snappy
7mailing list[0].
8
9[0]: <snappy-compression@googlegroups.com>
10
11From 903c72fb29b2db07b4abc38a5feb83d88f739d80 Mon Sep 17 00:00:00 2001
12From: huangwenjun <huangwenjun-hf@loongson.cn>
13Date: Fri, 10 Aug 2018 17:17:35 +0800
14Subject: [PATCH] Add O2 optimize flag in CmakeLists.txt.
15
16---
17 CMakeLists.txt | 3 +++
18 1 file changed, 3 insertions(+)
19
20diff --git a/CMakeLists.txt b/CMakeLists.txt
21index 62ecd09..29e0cdc 100644
22--- a/CMakeLists.txt
23+++ b/CMakeLists.txt
24@@ -6,6 +6,9 @@ set(CMAKE_CXX_STANDARD 11)
25 set(CMAKE_CXX_STANDARD_REQUIRED ON)
26 set(CMAKE_CXX_EXTENSIONS OFF)
27
28+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
29+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
30+
31 # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
32 # it prominent in the GUI.
33 option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF)
34--
352.1.0
36