Commit | Line | Data |
---|---|---|
16de7f15 TGR |
1 | From: Tobias Geerinckx-Rice <me@tobias.gr> |
2 | Date: Sun, 26 Aug 2018 17:24:42 +0200 | |
3 | Subject: [PATCH] snappy: Add O2 flag in CmakeLists.txt. | |
4 | ||
5 | Use ‘-O2’ optimisation when building with CMake, as is already done when | |
6 | using the Makefile. This patch was copied verbatim from the Snappy | |
7 | mailing list[0]. | |
8 | ||
9 | [0]: <snappy-compression@googlegroups.com> | |
10 | ||
11 | From 903c72fb29b2db07b4abc38a5feb83d88f739d80 Mon Sep 17 00:00:00 2001 | |
12 | From: huangwenjun <huangwenjun-hf@loongson.cn> | |
13 | Date: Fri, 10 Aug 2018 17:17:35 +0800 | |
14 | Subject: [PATCH] Add O2 optimize flag in CmakeLists.txt. | |
15 | ||
16 | --- | |
17 | CMakeLists.txt | 3 +++ | |
18 | 1 file changed, 3 insertions(+) | |
19 | ||
20 | diff --git a/CMakeLists.txt b/CMakeLists.txt | |
21 | index 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 | -- | |
35 | 2.1.0 | |
36 |