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 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3