I'm building a file using the CMake Build System and Microsoft's Visual C++ compiler. When I have CMake generate the visual studio project, the project contains the commandline to build a "Multi Threaded DLL" type of runtime -- one which depends on msvcrt.dll. For various reasons I'm not going into right now, I cannot depend on msvcrt.
Is there a way to tell CMake to modify this option in it's construction process?
I use the following piece of code to link to the static CRT:
I replace the dynamic flags (/MD and /MDd) with static flags (/MT and /MTd). Also, I found that I needed to cache the flag variables in order for it to stick.