[cmake-developers] [PATCH 3/3] VS: Pass MSVC compiler flags in upper case
Bach, Pascal
pascal.bach at siemens.com
Tue Sep 9 09:48:06 EDT 2014
> > Maybe a better solution would be to do this matching in a case insensitive
> way,
> > this way it would work in any case even with user passed flags in lower
> case.
>
> I'm saying that some flags are case sensitive and others are not.
> We cannot blindly match all "cl" flags insensitive to case, for
> example. Anyway, I think just matching the case is good enough
> for now.
Ok I didn't know that cl does care about casing for some flags.
> > - set(CMAKE_CREATE_WIN32_EXE "/entry:WinMainCRTStartup")
> > - set(CMAKE_CREATE_CONSOLE_EXE "/entry:mainACRTStartup")
> > - set(_PLATFORM_LINK_FLAGS " /subsystem:windowsce")
> > + set(CMAKE_CREATE_WIN32_EXE "/SUBSYSTEM:WINDOWSCE
> /ENTRY:WinMainCRTStartup")
> > + set(CMAKE_CREATE_CONSOLE_EXE "/SUBSYSTEM:WINDOWSCE
> /ENTRY:mainACRTStartup")
> > + set(_PLATFORM_LINK_FLAGS "")
>
> That appears to un-do this recent fix:
>
> MSVC: Fix linking of DLLs on WinCE (#15013)
> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e1283e4
> http://www.cmake.org/Bug/view.php?id=15013
>
> that introduced _PLATFORM_LINK_FLAGS in the first place.
The values added to _PLATFORM_LINK_FLAGS do never end up in the .vcxproj file.
The go into CMAKE_${lang}_CREATE_SHARED_LIBRARY [1] and CMAKE_${lang}_LINK_EXECUTABLE [2]
However I can't see how this variables should end up in the VS generator.
Any ideas?
[1] https://github.com/Kitware/CMake/blob/6ae98ee18f6c35b93556a66dc0ce909d84aec18b/Modules/Platform/Windows-MSVC.cmake#L242
[2] https://github.com/Kitware/CMake/blob/6ae98ee18f6c35b93556a66dc0ce909d84aec18b/Modules/Platform/Windows-MSVC.cmake#L256
More information about the cmake-developers
mailing list