From 613c643952f57dd3cea08234600a5e2e08abcc99 Mon Sep 17 00:00:00 2001 From: Scott R Charlton Date: Fri, 13 Mar 2015 21:44:58 +0000 Subject: [PATCH] updated for CLR on VS2010 git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@9359 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- CMakeLists.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1317483d..abf3c581 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -268,16 +268,14 @@ if (MSVC AND BUILD_SHARED_LIBS AND BUILD_CLR_LIBS) STRING(REPLACE " /EHsc" " /EHa /clr" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Remove /RTC1 from CMAKE_CXX_FLAGS_DEBUG STRING(REPLACE " /RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) - ADD_DEFINITIONS(-DMULTICHART) -endif() - -if (BUILD_CLR_LIBS AND MSVC AND MSVC_VERSION < 1600) - message(FATAL_ERROR "CLR options must be set manually for Visual Studio versions prior to 2010") -endif() - -if (MSVC10) - # turn off warnings on VS2010 - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4793 /wd4945") + if (MSVC10) + # turn off warnings on VS2010 + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4793 /wd4945") + endif() + if (MSVC_VERSION LESS 1600) + message(FATAL_ERROR "CLR options must be set manually for versions prior to Visual Studio 2010") + endif() + ADD_DEFINITIONS(-DMULTICHART) endif()