Transition to cmake on Windows
#21
What about the optimisation and executable locations in my post above?
Reply
Thanks given by:
#22
The optimization settings are somewhat misleading in the UI - they are present on the commandline, but the UI doesn't show them. I was confused by this, too, when I set up the LTCG and it didn't show in the UI.

The executable is output to the correct folder for me in VC2008, can you re-check with the latest version?
Note that the actual executable output path is $/MCServer/Debug/../MCServer_debug.exe, due to some limitations, but that does put the executable in the $/MCServer folder.
Reply
Thanks given by:
#23
Code:
/Yu"Globals.h" /MP /GS /TP /GL /analyze- /W3 /Zc:wchar_t /I"C:/Users/Tiger/Documents/GitHub/MCServer/src/../lib" /I"C:/Users/Tiger/Documents/GitHub/MCServer/src/../lib/jsoncpp/include" /I"C:/Users/Tiger/Documents/GitHub/MCServer/src" /Gm- /*!!!!!*//O2 /Ob2 /Fd"MCServer.dir\Release\vc120.pdb" /fp:precise /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "LUA_BUILD_AS_DLL" /D "XML_STATIC" /D "CMAKE_INTDIR=\"Release\"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /GR /Gd /Oy- /MT /Fa"Release/" /EHsc /nologo /Fo"MCServer.dir\Release\" /Fp"MCServer.dir\Release\MCServer.pch"

It says /o2 in the commandline as well, and MCServer still is built in MCServer/Debug. This is a new clone.
Reply
Thanks given by:
#24
What's wrong with /O2? Even MS says to use it instead of /Ox:
http://msdn.microsoft.com/en-us/library/...20%29.aspx

I'll have a look at the output, must be something wrong in the CMake generator for VS2013.
Reply
Thanks given by:
#25
Seems like a bug in CMake, I have filed a bug report: http://public.kitware.com/Bug/view.php?id=14702

So I guess we're stuck with the VC2013 folder for a while longer, and VC2008 can go.
Reply
Thanks given by:
#26
The bug report was responded to.

But without /ox, MCS will be marginally slower and larger on Windows! http://stackoverflow.com/questions/50633...er-options
Reply
Thanks given by:
#27
I've fixed the cmake file according to the solution they provided, now it generates correctly in my VS2010, so it should work for VS2013, too.

But even your link says /O2 is better than /Ox...
Reply
Thanks given by:
#28
Quote:Ox and O2 are almost identical. They differ only in the fact that O2 also throws GF and Gy. There is almost no reason to avoid throwing these two switches.

/GF is great - it pools all identical string literals in a read-only memory region. So if you have some literal in multiple areas of code you'll only have it once in the executable which reduces the image size. And if your code attempts to modify it you'll get Access Violation which protects you against dumb errors.
Reply
Thanks given by:
#29
It says that o2 is better?
Reply
Thanks given by:
#30
My English skills are a bit rusty, I don't know if "throwing" a switch means turning it on or offTongue I expect it to mean turning on, which means that /O2 is actually better than /Ox, according to that text.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)