1# - Modify compile flags to use the static runtimes of MSVC
2#
3#  include(MSVCStaticRuntime)
4#
5# Requires these CMake modules:
6#  ListCombinations.cmake
7#
8# Original Author:
9# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
10# http://academic.cleardefinition.com
11# Iowa State University HCI Graduate Program/VRAC
12#
13# Copyright Iowa State University 2009-2010.
14# Distributed under the Boost Software License, Version 1.0.
15# (See accompanying file LICENSE_1_0.txt or copy at
16# http://www.boost.org/LICENSE_1_0.txt)
17
18if(MSVC)
19	string(TOUPPER "${CMAKE_CONFIGURATION_TYPES}" _conftypesUC)
20	include(ListCombinations)
21	list_combinations(_varnames
22		PREFIXES
23		CMAKE_C_FLAGS_
24		CMAKE_CXX_FLAGS_
25		SUFFIXES
26		${_conftypesUC})
27	foreach(_var ${_varnames})
28		string(REPLACE "/MDd" "/MTd" ${_var} "${${_var}}")
29		string(REPLACE "/MD" "/MT" ${_var} "${${_var}}")
30	endforeach()
31endif()
32
33set(Boost_USE_STATIC_LIBS ON)
34