@@ -104,7 +104,7 @@ if (SANITIZE)
104
104
#add_cxx_flag("-Wsign-conversion")
105
105
#add_cxx_flag("-Wconversion")
106
106
add_cxx_flag("-Wdeprecated" )
107
- #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
107
+ #set(CMAKE_EXE_LINKER_FLAGS " ${CMAKE_EXE_LINKER_FLAGS} -pie ")
108
108
endif ()
109
109
110
110
include (CheckCXXCompilerFlag)
@@ -208,7 +208,7 @@ if (COVERAGE)
208
208
endif ()
209
209
210
210
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
211
- set (CMAKE_EXE_LINKER_FLAGS " -Wl,--discard-all -Wl,--build-id=sha1" )
211
+ set (CMAKE_EXE_LINKER_FLAGS " ${CMAKE_EXE_LINKER_FLAGS} -Wl,--discard-all -Wl,--build-id=sha1" )
212
212
endif ()
213
213
214
214
# -----------------------------------------------------------------------------
@@ -218,7 +218,8 @@ option(STATICCOMPILE "Compile to static executable (only works on linux)" OFF)
218
218
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux" )
219
219
if (STATICCOMPILE)
220
220
MESSAGE (STATUS "Compiling for static library use" )
221
- set (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -static" )
221
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -static " )
222
+ #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static ")
222
223
SET (CMAKE_FIND_LIBRARY_SUFFIXES ".a" )
223
224
set (NOMYSQL ON )
224
225
else ()
@@ -284,10 +285,6 @@ MESSAGE(STATUS "PROJECT_VERSION_PATCH: ${PROJECT_VERSION_PATCH}")
284
285
285
286
option (ONLY_SIMPLE "Only build very simplistic executable -- no Boost needed" OFF )
286
287
287
- if (STATICCOMPILE)
288
- set (ONLY_SIMPLE ON )
289
- endif ()
290
-
291
288
if (NOT ONLY_SIMPLE)
292
289
set (boost_components "" )
293
290
set (boost_components ${boost_components} program_options)
@@ -332,10 +329,6 @@ ENDIF ()
332
329
# -----------------------------------------------------------------------------
333
330
option (NOZLIB "Don't use zlib" OFF )
334
331
335
- if (STATICCOMPILE)
336
- set (NOZLIB ON )
337
- endif ()
338
-
339
332
if (NOT NOZLIB)
340
333
find_package (ZLIB)
341
334
IF (ZLIB_FOUND)
0 commit comments