aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2019-12-09 02:50:39 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2019-12-09 03:53:58 +0300
commit5d20942653cbf6a25df2117741adc2a9cdefe8e0 (patch)
tree9eac488c82af53b9f72f7157a18d975148ae7caf
parentupdate cmake-common (diff)
downloadaes-tools-5d20942653cbf6a25df2117741adc2a9cdefe8e0.tar.gz
aes-tools-5d20942653cbf6a25df2117741adc2a9cdefe8e0.zip
minor improvements to CMakeLists.txt
-rw-r--r--CMakeLists.txt12
-rw-r--r--utils/CMakeLists.txt4
2 files changed, 6 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63d1a42..5a03ad7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,10 @@
-project(aes_tools)
+cmake_minimum_required(VERSION 3.1)
+
+project(aes_tools C CXX)
include(cmake/common.cmake)
-set(AES_TOOLS_ASM OFF CACHE BOOL "Use the assembly language implementation instead of the one in C")
+option(AES_TOOLS_ASM "Use the assembly language implementation instead of the one in C")
file(GLOB_RECURSE aes_include "include/*.h")
@@ -20,10 +22,8 @@ endif()
add_library(aes ${aes_src} ${aes_include})
target_include_directories(aes PUBLIC include/)
-if(is_root_project)
- if(MSVC)
- target_compile_definitions(aes PRIVATE _CRT_SECURE_NO_WARNINGS)
- endif()
+if(MSVC)
+ target_compile_definitions(aes PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index 6b7a1c4..b141e62 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -1,7 +1,3 @@
-if(MSVC)
- add_definitions(/DNOMINMAX)
-endif()
-
find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
set(block_util_headers block_cmd_parser.hpp block_dumper.hpp block_input.hpp data_parsers.hpp helpers/command_line.hpp)