boringssl/crypto/modes/CMakeLists.txt
Adam Langley 75e44ae21d Move gcm_test to C++
Since gcm_test now contains variable decls in for loops it needs
-std=c11. However, tests are compiled with C++ test_support files in
Bazel, which doesn't work with -std=c11.

Change-Id: Ife18c2d80b01448bb3b7ee2728412289bf749bd9
Reviewed-on: https://boringssl-review.googlesource.com/11041
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2016-09-14 16:51:56 +00:00

67 lines
1020 B
CMake

include_directories(../../include)
if (${ARCH} STREQUAL "x86_64")
set(
MODES_ARCH_SOURCES
aesni-gcm-x86_64.${ASM_EXT}
ghash-x86_64.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "x86")
set(
MODES_ARCH_SOURCES
ghash-x86.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "arm")
set(
MODES_ARCH_SOURCES
ghash-armv4.${ASM_EXT}
ghashv8-armx.${ASM_EXT}
)
endif()
if (${ARCH} STREQUAL "aarch64")
set(
MODES_ARCH_SOURCES
ghashv8-armx.${ASM_EXT}
)
endif()
add_library(
modes
OBJECT
cbc.c
ctr.c
ofb.c
cfb.c
gcm.c
${MODES_ARCH_SOURCES}
)
perlasm(aesni-gcm-x86_64.${ASM_EXT} asm/aesni-gcm-x86_64.pl)
perlasm(ghash-x86_64.${ASM_EXT} asm/ghash-x86_64.pl)
perlasm(ghash-x86.${ASM_EXT} asm/ghash-x86.pl)
perlasm(ghash-armv4.${ASM_EXT} asm/ghash-armv4.pl)
perlasm(ghashv8-armx.${ASM_EXT} asm/ghashv8-armx.pl)
add_executable(
gcm_test
gcm_test.cc
$<TARGET_OBJECTS:test_support>
)
target_link_libraries(gcm_test crypto)
add_dependencies(all_tests gcm_test)