From 57a0f4d30976c75b910868341f8d8171f18ba246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20=C3=98stergaard?= Date: Sun, 7 Jun 2015 14:44:17 +0200 Subject: [PATCH] Fix compiler detection for windows GCC cross compilation will use the compiler arguments that was only intended for MSVC. Replace the if(WIN32) with if(MSVC). --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 47643a03..1c273945 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,10 +32,10 @@ IF(CMAKE_COMPILER_IS_GNUXX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-but-set-variable -fPIC") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-but-set-variable -fPIC") ENDIF(CMAKE_COMPILER_IS_GNUXX) -IF(WIN32) +IF(MSVC) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP8 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP8 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS") -ENDIF(WIN32) +ENDIF(MSVC) # Apps, examples, tests, ...?