[CMake] problems with Visual Studio Express 2013 [SOLVED, I think]

Kris Thielemans kris at asc.uk.com
Sun Nov 9 18:46:26 EST 2014


> From: Kris Thielemans 
> Sent: 05 March 2014 11:28
> 
> Hi all
> 
> We're trying to build an application using ITK on Windows using Visual
Studio
> Express 2013 (downloads of all software happened last week, so I guess
> we're up-to-date). Unfortunately, we get a lot of configuration errors
(see full
> list below), implying that CMake 2.8.12.2 has problems with this compiler.
> The first one is like this:
> 
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:311
> (file):
>   file STRINGS file
> 
<snip>
> 
> We first thought that we could get through this, as when pressing the
> Configure button again, those warnings disappear, and we can generate the
> project files, and VSE2013 loads them without problem, and indeed even can
> compile. However, we do get a lot of errors building ITK. On closer
> inspection, the compiler flags are not set properly (for instance,
exception
> handling is not enabled). Indeed, checking the CMake Advanced variables,
all
> compiler flags are just empty.
> 

Hi all,

I had a related problem on another computer just now, this time figured out
what I did wrong, and  so thought that I'd send it out for benefit of
others. This time, I didn't have any configuration errors as above, but I
did have loads of build errors because the CMAKE_CXX_FLAGS were again all
empty.

What happened was the following: I installed Visual Studio for Windows
(wrong!), ran CMake forcing it to use Visual Studio 2013, it loudly
complained that it couldn't find the compiler, I realised my mistake and
installed Visual Studio for Desktop (right!), and ran CMake, re-configuring
the build. CMake was happy, but obviously the projects were faulty. The
solution was simple: clear the cache, get rid of the whole build directory
and start from scratch.

Oh well. I hope that my struggles will help somebody else...

Kris




More information about the CMake mailing list