aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-10-14 08:35:18 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-10-14 08:35:18 +0300
commite73a5600b8b4c87001eb0d70e2efb41d30430130 (patch)
tree966d31a00d99f2cc6b9e903079bfce6ed24550a1
parenttest: fix Pylint warnings (diff)
downloadaes-tools-e73a5600b8b4c87001eb0d70e2efb41d30430130.tar.gz
aes-tools-e73a5600b8b4c87001eb0d70e2efb41d30430130.zip
CMakeLists.txt fixes
-rw-r--r--CMakeLists.txt12
-rw-r--r--cxx/CMakeLists.txt2
2 files changed, 11 insertions, 3 deletions
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)
diff --git a/cxx/CMakeLists.txt b/cxx/CMakeLists.txt
index 97cb9a5..df73860 100644
--- a/cxx/CMakeLists.txt
+++ b/cxx/CMakeLists.txt
@@ -4,6 +4,6 @@ add_library(libaesxx INTERFACE)
target_include_directories(libaesxx INTERFACE include/ ${Boost_INCLUDE_DIRS})
target_link_libraries(libaesxx INTERFACE libaes)
-if(CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_COMPILER_IS_GNUCXX)
target_compile_options(libaesxx INTERFACE -std=c++11)
endif()