From bebc8737c80b00ba41221e9380b3eb35070ed1b4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 28 Jan 2015 21:39:38 +0000 Subject: [PATCH] Use more targeted compile flags setup. --- contrib/blake2/CMakeLists.txt | 4 ++-- contrib/libottery/CMakeLists.txt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 -- 2.39.5