> On 09/08/2014 05:35 AM, Pascal Bach wrote:
> > Even better would be to make the search case insensitive.
> 
> How do we know which flags are sensitive to case?

It has nothing to do with Visual Studio as it doesn't care about the casing.
The problem is in the CMake generator. The tables in (eg. 
Source/cmVS10LinkFlagTable.h) map from linker flags to XML elements in the 
resulting .vcxproj file.   

One such example is the entry:
{"SubSystem", "SUBSYSTEM:WINDOWSCE",
   "WindowsCE", "WindowsCE", 0},

This maps a flag 
/SUBSYSTEM:WINDOWSCE 
to
<Subsystem>
WindowsCE
</Subsystem>

As you can see the entries in the table are in upper case. And the mapping does 
only work if the flags are uppercase to.
Maybe a better solution would be to do this matching in a case in sensitive 
way, this way it would work in any case even with user passed flags in lower 
case.

> 
> > -  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.

Rith I think I had a too simplistic view here. But even the old fix doesn't 
seem to work with VS. I think the /ENTRY point also needs to be set for the 
DLLs, I will try if I can find out how to set this.

Pascal

PS: Forgot to add the mailinglist.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to