aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorredfish <redfish@galactica.pw>2016-06-21 19:53:07 -0400
committerredfish <redfish@galactica.pw>2016-06-21 19:53:07 -0400
commitbb39034405df7fb74b4687740281a15e51359a24 (patch)
tree52f118391556106c2ec9b8b5bbb8eeb866eb2314 /CMakeLists.txt
parentMerge pull request #842 (diff)
downloadmonero-bb39034405df7fb74b4687740281a15e51359a24.tar.xz
cmake: remove repetitive code in handling of NO_AES
Minor eefactor only. No behavior or interface change in this commit.
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9674404bb..ab2c83a96 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -329,16 +329,17 @@ 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}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG}")
+
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}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG}")
+ if (NOT NO_AES)
+ message(STATUS "AES support enabled")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -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} -maes")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} -maes")
+ message(STATUS "AES support disabled")
endif()
if(ARM6)