From e73a5600b8b4c87001eb0d70e2efb41d30430130 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 14 Oct 2016 08:35:18 +0300 Subject: CMakeLists.txt fixes --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c16efd..40ac9bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,14 @@ project(aes_tools) +if(MSVC) + add_compile_options(/MP /W4) +elseif(CMAKE_COMPILER_IS_GNUCC) + add_compile_options(-Wall -Wextra) +endif() + file(GLOB_RECURSE libaes_headers "include/*.h") -if(LIBAES_USE_ASM) +if(MSVC AND LIBAES_USE_ASM) enable_language(ASM_MASM) file(GLOB libaes_c_sources "src/*.c") @@ -21,7 +27,9 @@ endif() add_library(libaes ${libaes_sources} ${libaes_headers}) target_include_directories(libaes PUBLIC include/) -target_compile_definitions(libaes PRIVATE _CRT_SECURE_NO_WARNINGS) +if(MSVC) + target_compile_definitions(libaes PRIVATE _CRT_SECURE_NO_WARNINGS) +endif() add_subdirectory(cxx) -- cgit v1.2.3