summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorCNugteren <web@cedricnugteren.nl>2016-05-18 20:53:40 +0200
committerCNugteren <web@cedricnugteren.nl>2016-05-18 20:53:40 +0200
commit748df9bf753637e25ab9806ce994b758448f15d3 (patch)
treedf7a8e3424a82b30584143a37a453d9ddda4efa3 /CMakeLists.txt
parent9bccc2544a6777102eb3317e65f9b7bb195f081b (diff)
Fixes for Visual Studio
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6cfa5281..3409196d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,14 +53,14 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
message(FATAL_ERROR "ICC version must be at least 14.0")
endif()
-elseif(CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
+elseif(MSVC)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
message(FATAL_ERROR "MS Visual Studio version must be at least 18.0")
endif()
endif()
# C++ compiler settings
-if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
+if(MSVC)
set(FLAGS "/Ox")
set(FLAGS "${FLAGS} /wd4715")
else()
@@ -80,7 +80,7 @@ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
# C compiler settings (for the sample)
-if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
+if(MSVC)
set(CFLAGS "/Ox")
else()
set(CFLAGS "-O3 -std=c99")