[CMake] Executable extension (MSVC)

Bill Hoffman bill.hoffman at kitware.com
Wed May 14 11:25:53 EDT 2008


PCJohn wrote:
> Dear cmakers,
> 
> I really need to set executable extension to .com instead to standard 
> .exe (using MSVC). Is it possible to do that, or do I need to not use 
> cmake for win32 platform?
> 
> Reasons:
> I planned to port InventorTools utilities 
> (http://merlin.fit.vutbr.cz/wiki/index.php/Open_Inventor_Tools) to 
> cmake, I am using "dual gui/console" behaviour (like the one described 
> at http://www.codeguru.com/Cpp/W-D/console/redirection/article.php/c3955).
> In short: two executable exists - utility.com and utility.exe.
> If I type utility or utility.com in windows console, I can work with the 
> application as with ordinary console application.
> When I run utility.exe (started from Explorer or by shortcut, or Windows 
> gui), I get normal Windows application - no annoying console, just gui.
> This can not be realized in single executable. utility.com always opens 
> console, even when started from gui, and utility.exe never communicate 
> through console - as given by nature of Windows :( . Just both of them 
> can do the thing.
> Everything worked perfectly in MSVC, however I am unable to reconstruct 
> the scenario in cmake due to difficulties with com extension.
> 

What are the flags used in MSVC to create a .com file?

-Bill


More information about the CMake mailing list