[CMake] How to Switch to Static Runtime on Command Line?

Osman Zakir osmanzakir90 at hotmail.com
Mon Oct 28 07:45:30 EDT 2019


I tried "-DCMAKE_MSVC_RUNTIME_LIBRARY=MT" and also "-DCMAKE_MSVC_RUNTIME_LIBRARY=/MT" before that, along with "-DCMAKE_BUILD_TYPE=Release", but I still get "Using Release VC++ CRT: MD".  What's going on?  I also did "-DCMAKE_CXX_FLAGS="/permissive- /EHsc /std:c++17 /O2 /MT /D_SILENCE_ALL_CXX_DEPRECATION_WARNINGS"" but this also didn't help.  Do you have any ideas?

The command I ran was "cmake -S../llvm -G"Visual Studio 16 2019" -Thost=x64 -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=MT -DCMAKE_CXX_FLAGS="/permissive- /EHsc /std:c++17 /O2 /MT /D_SILENCE_ALL_CXX_DEPRECATION_WARNINGS" -DLLVM_ENABLE_RTTI=On -DLLVM_ENABLE_EH=ON -DCMAKE_CXX_STANDARD=17 -DPYTHON_HOME=C:/Users/Osman/AppData/Local/Programs/Python/Python38 -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;libcxx;libcxxabi"".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191028/325e55e7/attachment.html>


More information about the CMake mailing list