[CMake] How to Switch to Static Runtime on Command Line?
Eric Doenges
doenges at mvtec.com
Mon Oct 28 10:07:55 EDT 2019
By default, CMake will use /EHsc when compiling for the Windows
platform, with no option to change this that I am aware of. If a project
wants different settings, it needs to handle this itself. And in fact,
LLVM 3.4.2 conditionally modifies /EHsc to /EHs-c- in
cmake/modules/LLVMProcessSources.cmake, so I wouldn't be surprised if
LLVM 10.0.0 does something similar (I don't have a more recent version
of LLVM lying about, so I can't check).
To figure out what option(s) you need to set or what files you need to
modify, you either need to ask the LLVM developers, or dig through the
LLVM cmake project to figure out what it is doing with the /EHsc option.
Am 28.10.19 um 13:33 schrieb Osman Zakir:
> Alright, thanks. What about enabling C++ exceptions? I tried setting
> LLVM_ENABLE_EH to On, but it didn't help. Setting CMAKE_CXX_FLAGS to
> /EHsc doesn't help either.
--
*Dr. Eric Dönges*
Senior Software Engineer
MVTec Software GmbH | Arnulfstr. 205 | 80634 Munich | Germany
doenges at mvtec.com <mailto:mustermann at mvtec.com> | Tel: +49 89 457 695-0
| www.mvtec.com <http://www.mvtec.com>
Find our privacy policy here <https://www.mvtec.com/imprint>.
Sign up <https://www.mvtec.com/newsletter> for our MVTec Newsletter!
Geschäftsführer: Dr. Wolfgang Eckstein, Dr. Olaf Munkelt
Amtsgericht München HRB 114695
MVTec Software GmbH Logo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20191028/63c28773/attachment.html>
More information about the CMake
mailing list