llvm.org GIT mirror llvm / 7adae8e
Revert my CMake patches concerning building with /MT (r194589, r194596) Reid pointed out we already have LLVM_USE_CRT_{buildtype} to set it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194604 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
3 changed file(s) with 0 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
1515 set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}svn")
1616
1717 option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
18
19 option(LLVM_STATIC_MSVC_RUNTIME "When using MSVC, link against the static run-time (/MT)" OFF)
2018
2119 option(LLVM_USE_FOLDERS "Enable solution folders in Visual Studio. Disable for Express versions." ON)
2220 if ( LLVM_USE_FOLDERS )
44 include(AddLLVMDefinitions)
55 include(CheckCCompilerFlag)
66 include(CheckCXXCompilerFlag)
7 include(LLVMProcessSources)
87
98 if( CMAKE_COMPILER_IS_GNUCXX )
109 set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
3938 endif()
4039 endif()
4140 endif()
42
43 if(MSVC AND LLVM_STATIC_MSVC_RUNTIME)
44 # Link against the static runtime.
45 foreach(flag CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
46 CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELEASE
47 CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_MINSIZEREL)
48 llvm_replace_compiler_option("${flag}" "/MD" "/MT")
49 endforeach()
50 foreach(flag CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG)
51 llvm_replace_compiler_option("${flag}" "/MDd" "/MTd")
52 endforeach()
53 endif()
5441
5542 if(WIN32)
5643 if(CYGWIN)
278278 Define the sanitizer used to build LLVM binaries and tests. Possible values
279279 are ``Address``, ``Memory`` and ``MemoryWithOrigins``. Defaults to empty
280280 string.
281
282 **LLVM_STATIC_MSVC_RUNTIME**:BOOL
283 When building with MSVC, link against the static runtime library (/MT or /MTd
284 for release and debug builds, respectively) instead of the dynamic one.
285 Defaults to OFF.
286281
287282 Executing the test suite
288283 ========================