[CMake] VS2005 emitter and /vmg compiler option: bug?

Bill Hoffman bill.hoffman at kitware.com
Fri Nov 23 18:49:20 EST 2007


Theodore Omtzigt wrote:
> For SystemC, code needs to be compiled with the /vmg compiler option of 
> the VS compilers. However, when I use CMAKE_CXX_FLAGS_DEBUG to set this 
> option, it changes the run-time bindings from DLL to static. This causes 
> grief with the rest of the libraries which are all be default compiled 
> with the DLL bindings.
> 
>  
> 
> When I try to force the run-time as follows:
> 
> set( CMAKE_CXX_FLAGS_DEBUG /vmg /MDd)
> 
>  
> 
> The compiler command line adds a “;” to the /vmg and thus changes the 
> switch to a meaningless string for VS and I am back to non-compiling 
> code due to the /vmg being missing.
> 
>  
> 
> How do I fix this problem?
> 
>  

set( CMAKE_CXX_FLAGS_DEBUG "/vmg /MDd")

-Bill


More information about the CMake mailing list