From 5d20942653cbf6a25df2117741adc2a9cdefe8e0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 9 Dec 2019 02:50:39 +0300 Subject: minor improvements to CMakeLists.txt --- CMakeLists.txt | 12 ++++++------ utils/CMakeLists.txt | 4 ---- 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) -- cgit v1.2.3