Hi Johannes!

Thanks for your excellent work!

Sorry for not responding earlier but I've been traveling and it was lost in
the inbox. :(

The space savings are great. Hopefully it will enable some performance
benefit too.

Cheers,
/Marcus

P.S. Good catch on incremental linking too!

2017-02-01 16:03 GMT+01:00 Johannes <jbru...@datasolid.de>:

> Hi,
>
> finally I have finished the link flag undertaking :-)
>
> Attached you can find the final diff file.
>
> What I have done:
>
> 1. Added cmake variable OSG_WINDOWS_LINK_OPTIMIZE which defaults to OFF.
> If the variable is ON the /OPT:REF /OPT:ICF are added to the
> CMAKE_SHARED_LINKER_FLAGS_DEBUGOPT, CMAKE_SHARED_LINKER_FLAGS_RELEASE,
> CMAKE_EXE_LINKER_FLAGS_DEBUGOPT, and CMAKE_EXE_LINKER_FLAGS_RELEASE
> variables.
>
> 2. I removed the cmake code that tried to handle the INCREMENTAL linking
> in the DEBUG case. I have done that for two reasons:
>
>   At first, I realized that the code is not working at all.
> On my platform MSVC 2013 VC12 the CMAKE_SHARED_LINKER_FLAGS_DEBUG
> variable contains the following content at the beginning:
> "/debug /INCREMENTAL".
>
> The string replacement code in OSGSetupCompiler.cmake tries to replace
> string "INCREMENTAL:YES" with "INCREMENTAL:NO":
>
> STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags
> ${CMAKE_SHARED_LINKER_FLAGS_DEBUG})
>
> That does not work, since the search string is not contained in the
> variable.
>
> After that follows the code line:
>
> SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/INCREMENTAL:NO ${replacementFlags}"
> ).
>
> That also won't work, since the "/INCREMENTAL" contained in the variable
> replacementFlags is appended to the CMAKE_SHARED_LINKER_FLAGS_DEBUG
> variable what finally leads to the following content of variable
> CMAKE_SHARED_LINKER_FLAGS_DEBUG:
>
> "/INCREMENTAL:NO /debug /INCREMENTAL msvcprtd.lib msvcrtd.lib".
>
> Thus the incremental linking is still active.
>
>   Secondly, it is not desirable to do not incremental linking on the debug
> variant which is used at development times and thus requires short turn
> around times. I do not know for what reason that code was added to the
> OSGCompiler.cmake file but I strongly recommend to relinquish that part.
>
> I hope that this patch pleases all parties.
>
> Best,
> Johannes
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
>


-- 
Med vänliga hälsningar,
Marcus Lindblom Sonestedt
*Systemarkitekt*
*BIT ADDICT *- Passion för utveckling
+46 (0)706 43 63 28
marcus.lindblom.sonest...@bitaddict.se
www.bitaddict.se
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to