aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSean Cross <sean@xobs.io>2019-08-15 16:28:03 +0800
committerSean Cross <sean@xobs.io>2019-08-15 16:28:03 +0800
commit8b63de9e552ff2b991e047723ea715b4b7d99575 (patch)
tree152bf56cbbef2e78e044401d3f5cee76006b597e /CMakeLists.txt
parentaa7e20357f4676274067247cfd5322219a790649 (diff)
downloadnextpnr-8b63de9e552ff2b991e047723ea715b4b7d99575.tar.gz
nextpnr-8b63de9e552ff2b991e047723ea715b4b7d99575.tar.bz2
nextpnr-8b63de9e552ff2b991e047723ea715b4b7d99575.zip
cmake: static: add msvc check before adding msvc flags
When building with STATIC_BUILD=ON, different flags need to be specified when using MSVC. Check for this flag and only set them if necessary. Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c808572d..f662dbe7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@ set(link_param "")
if (STATIC_BUILD)
set(Boost_USE_STATIC_LIBS ON)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "/MT")
set(CMAKE_CXX_FLAGS_DEBUG "/MTd")
if (BUILD_PYTHON)