diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-01-26 23:19:53 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-01-26 23:19:53 +0200 |
commit | 615079e2f46aaac4102969e73196c31138d299e5 (patch) | |
tree | c5d98af8e4ffb79a13ed64f973fe7e21dd3b5de9 /CMakeLists.txt | |
parent | Merge pull request #215 (diff) | |
download | monero-615079e2f46aaac4102969e73196c31138d299e5.tar.xz |
allow for explicitly disabling AES-NI
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c91caff6e..cfeb1c60b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,8 +180,19 @@ else() else() set(STATIC_ASSERT_FLAG "-Dstatic_assert=_Static_assert") endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} -maes") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} -maes") + + option(NO_AES "Explicitly disable AES support" ${NO_AES}) + + if (NO_AES) + message(STATUS "Disabling AES support") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} -maes") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} -maes") + else() + message(STATUS "Enabling AES support") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG}") + endif() + if(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGTEST_HAS_TR1_TUPLE=0") endif() |