Skip to content
This repository was archived by the owner on Oct 23, 2021. It is now read-only.

Commit 32e5c17

Browse files
committed
Strip binary
1 parent 9f3952c commit 32e5c17

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
cmake_minimum_required (VERSION 2.6 FATAL_ERROR)
22

3-
set (CMAKE_C_COMPILER "gcc")
4-
set (CMAKE_C_FLAGS "-Wall -lpthread")
5-
set (CMAKE_C_FLAGS_DEBUG "-g3")
6-
set (CMAKE_C_FLAGS_RELEASE "-O3")
73
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
84
set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
95
set (INIT_SCRIPT_PATH ${PROJECT_SOURCE_DIR}/init)
106
set (SOURCE_PATH ${PROJECT_SOURCE_DIR}/src)
117

8+
if(CMAKE_COMPILER_IS_GNUCXX)
9+
set (CMAKE_C_FLAGS "-Wall -lpthread")
10+
set (CMAKE_C_FLAGS_DEBUG "-g3")
11+
set (CMAKE_C_FLAGS_RELEASE "-O3")
12+
set (CMAKE_EXE_LINKER_FLAGS "-s")
13+
endif()
14+
1215
if(NOT UNIX)
1316
message (FATAL_ERROR "Only Unix-like system is supported, quit.")
1417
endif ()

0 commit comments

Comments
 (0)