From: Vsevolod Stakhov Date: Wed, 28 Jan 2015 21:39:38 +0000 (+0000) Subject: Use more targeted compile flags setup. X-Git-Tag: 0.9.0~817^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bebc8737c80b00ba41221e9380b3eb35070ed1b4;p=rspamd.git Use more targeted compile flags setup. --- diff --git a/contrib/blake2/CMakeLists.txt b/contrib/blake2/CMakeLists.txt index 58c79450b..76ea48591 100644 --- a/contrib/blake2/CMakeLists.txt +++ b/contrib/blake2/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.6) set(BLAKE_SRC blake2b-ref.c) +add_library(blake2 STATIC "${BLAKE_SRC}") if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") + set_target_properties(blake2 PROPERTIES COMPILER_FLAGS "-O3") endif () -add_library(blake2 STATIC "${BLAKE_SRC}") diff --git a/contrib/libottery/CMakeLists.txt b/contrib/libottery/CMakeLists.txt index 0483c49f3..a2b3d8c0a 100644 --- a/contrib/libottery/CMakeLists.txt +++ b/contrib/libottery/CMakeLists.txt @@ -3,7 +3,7 @@ SET(OTTERYSRC chacha_merged.c ottery_cpuinfo.c ottery_entropy.c ottery_global.c) +ADD_LIBRARY(ottery STATIC ${OTTERYSRC}) if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") -endif () -ADD_LIBRARY(ottery STATIC ${OTTERYSRC}) \ No newline at end of file + set_target_properties(ottery PROPERTIES COMPILER_FLAGS "-O3") +endif () \ No newline at end of file