diff options
Diffstat (limited to 'crypto/CMakeLists.txt')
-rw-r--r-- | crypto/CMakeLists.txt | 55 |
1 files changed, 14 insertions, 41 deletions
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt index 23a1a505..94e47ea1 100644 --- a/crypto/CMakeLists.txt +++ b/crypto/CMakeLists.txt @@ -22,6 +22,7 @@ elseif(UNIX) endif() set(ASM_EXT S) enable_language(ASM) + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack") else() if (CMAKE_CL_64) message("Using nasm") @@ -53,39 +54,6 @@ function(perlasm dest src) ) endfunction() -if (${ARCH} STREQUAL "x86_64") - set( - CRYPTO_ARCH_SOURCES - - cpu-intel.c - ) -endif() - -if (${ARCH} STREQUAL "x86") - set( - CRYPTO_ARCH_SOURCES - - cpu-intel.c - ) -endif() - -if (${ARCH} STREQUAL "arm") - set( - CRYPTO_ARCH_SOURCES - - cpu-arm.c - cpu-arm-asm.S - ) -endif() - -if (${ARCH} STREQUAL "aarch64") - set( - CRYPTO_ARCH_SOURCES - - cpu-arm.c - ) -endif() - # Level 0.1 - depends on nothing outside this set. add_subdirectory(stack) add_subdirectory(lhash) @@ -106,6 +74,7 @@ add_subdirectory(conf) add_subdirectory(chacha) add_subdirectory(poly1305) add_subdirectory(curve25519) +add_subdirectory(newhope) # Level 1, depends only on 0.* add_subdirectory(digest) @@ -182,16 +151,19 @@ set( $<TARGET_OBJECTS:pem> $<TARGET_OBJECTS:x509> $<TARGET_OBJECTS:x509v3> - $<TARGET_OBJECTS:pkcs8> + $<TARGET_OBJECTS:pkcs8_lib> + $<TARGET_OBJECTS:newhope> PARENT_SCOPE ) add_library( crypto-objects OBJECT + cpu-aarch64-linux.c + cpu-arm.c + cpu-arm-linux.c + cpu-intel.c crypto.c - directory_posix.c - directory_win.c ex_data.c mem.c refcount_c11.c @@ -210,9 +182,11 @@ add_library( add_library( crypto + cpu-aarch64-linux.c + cpu-arm.c + cpu-arm-linux.c + cpu-intel.c crypto.c - directory_posix.c - directory_win.c ex_data.c mem.c refcount_c11.c @@ -223,8 +197,6 @@ add_library( thread_win.c time_support.c - ${CRYPTO_ARCH_SOURCES} - $<TARGET_OBJECTS:stack> $<TARGET_OBJECTS:lhash> $<TARGET_OBJECTS:err> @@ -263,7 +235,8 @@ add_library( $<TARGET_OBJECTS:pem> $<TARGET_OBJECTS:x509> $<TARGET_OBJECTS:x509v3> - $<TARGET_OBJECTS:pkcs8> + $<TARGET_OBJECTS:pkcs8_lib> + $<TARGET_OBJECTS:newhope> ) if(NOT MSVC AND NOT ANDROID) |