From 0700ae054385610eef21ba673413811b1d9e4b64 Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Thu, 15 Dec 2016 12:38:51 +0100 Subject: Debugged CMake files which caused compiler flags to be truncated --- libcmix-crypto/CMakeLists.txt | 4 ++-- libcmix-crypto/elgamal/gcrypt/CMakeLists.txt | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'libcmix-crypto') diff --git a/libcmix-crypto/CMakeLists.txt b/libcmix-crypto/CMakeLists.txt index 7fa0d29..56dd553 100644 --- a/libcmix-crypto/CMakeLists.txt +++ b/libcmix-crypto/CMakeLists.txt @@ -13,7 +13,7 @@ set(interface_sources ) target_sources(cmix-crypto-interface - INTERFACE ${interace_sources} + INTERFACE ${interface_sources} ) include(curve25519_implementations) @@ -32,7 +32,7 @@ target_sources(cmix-crypto INTERFACE ${interface_sources} ) -option(UseEC "Use curve25519 instead of RSA" OFF) +option(UseEC "Use curve25519 instead of elgamal in a multiplicative group" OFF) if(UseEC) target_link_libraries(cmix-crypto diff --git a/libcmix-crypto/elgamal/gcrypt/CMakeLists.txt b/libcmix-crypto/elgamal/gcrypt/CMakeLists.txt index 85d532b..d8c19b8 100644 --- a/libcmix-crypto/elgamal/gcrypt/CMakeLists.txt +++ b/libcmix-crypto/elgamal/gcrypt/CMakeLists.txt @@ -16,9 +16,20 @@ if(trace_pointers) ) endif(trace_pointers) -target_compile_options(${target_name} - PUBLIC ${Gcrypt_CFLAGS} -) +if(NOT Gcrypt_CFLAGS STREQUAL "") + IF(WIN32) + separate_arguments(flags WINDOWS_COMMAND ${Gcrypt_CFLAGS}) + else(WIN32) + separate_arguments(flags UNIX_COMMAND ${Gcrypt_CFLAGS}) + endif(WIN32) + + foreach(flag ${flags}) + target_compile_options(${target_name} + PUBLIC ${flag} + ) + endforeach(flag) +endif(NOT Gcrypt_CFLAGS STREQUAL "") + target_link_libraries(${target_name} PRIVATE elgamal-interface -- cgit v1.2.3-70-g09d2