aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2015-06-10 16:51:22 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2015-06-10 16:51:22 +0300
commit9c9f4ed7cfe1ed7b02025095c3ae5a4bc30ed93b (patch)
treeb52e5712cd2082b0cc057c27ef974178947cb003
parenttest: README update (diff)
downloadaes-tools-9c9f4ed7cfe1ed7b02025095c3ae5a4bc30ed93b.tar.gz
aes-tools-9c9f4ed7cfe1ed7b02025095c3ae5a4bc30ed93b.zip
/SAFESEH for the asm implementation
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt8
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--test/CMakeLists.txt2
-rw-r--r--utils/CMakeLists.txt2
4 files changed, 6 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 029dd51..8eb62b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,9 +1,13 @@
project(libaesni C CXX ASM_MASM)
file(GLOB_RECURSE ${PROJECT_NAME}_headers "include/*.h")
if(AESNI_USE_ASM)
- file(GLOB ${PROJECT_NAME}_sources "src/asm/*.asm" "src/*.c")
+ file(GLOB ${PROJECT_NAME}_c_sources "src/*.c")
+ file(GLOB ${PROJECT_NAME}_asm_sources "src/asm/*.asm")
+ set(${PROJECT_NAME}_sources ${${PROJECT_NAME}_asm_sources} ${${PROJECT_NAME}_c_sources})
+ set_source_files_properties(${${PROJECT_NAME}_asm_sources} PROPERTIES COMPILE_FLAGS "/safeseh")
+ # Setting CMAKE_ASM_MASM_FLAGS doesn't work: http://www.cmake.org/Bug/view.php?id=14711
else()
- file(GLOB ${PROJECT_NAME}_sources "src/c/*.c" "src/*.c")
+ file(GLOB_RECURSE ${PROJECT_NAME}_sources "src/*.c")
endif()
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_headers}
${${PROJECT_NAME}_sources})
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 8cf4d6a..d8ce968 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
-
macro(example prefix)
add_executable(example_${prefix} ${prefix}.c)
target_link_libraries(example_${prefix} libaesni)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index bfbb09c..2a1cc9a 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
-
macro(test prefix)
add_executable(test_${prefix}_encrypt_block ${prefix}_encrypt_block.c)
target_link_libraries(test_${prefix}_encrypt_block libaesni)
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index e770857..f6ca7d1 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -1,5 +1,3 @@
-set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
-
macro(util prefix)
add_executable(util_${prefix} ${prefix}.cpp)
target_link_libraries(util_${prefix} libaesni)