[CMake] Missing CMAKE_CONFIGURATION_TYPES with project NONE on Windows

Paul Smith paul at mad-scientist.net
Fri May 10 10:53:34 EDT 2013


Er... I take it back about being able to set the value by hand.  If I do
so I get a TON of errors, for each of the builtin variable variants for
MinSizeRel and RelWithDebInfo (e.g., CMAKE_C_FLAGS_MINRELSIZE / "Error
required internal CMake variable not set").

Now I'm not sure what to do.


On Fri, 2013-05-10 at 10:31 -0400, Paul Smith wrote:
> Hi all.  I'm using cmake 2.8.10.2.  I'm trying to introduce an
> alternative compiler into my build system for Linux, so as a first step
> I've separated my project statement from:
> 
>   project(MyProject C CXX)
> 
> into:
> 
>   project(MyProject NONE)
>   enable_language(C)
>   enable_language(CXX)
> 
> This works fine on Linux (makefile generator) and MacOSX (XCode
> generator): cmake and build and test work.  But on Windows (VS 10 Win64
> generator) cmake succeeds, but running the resulting project file does
> not work: it fails immediately.  Looking at the CMakeCache.txt file I
> can see that two of the default CMAKE_CONFIGURATION_TYPES settings are
> missing; the cached value from before I made the above change is:
> 
>   CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
> 
> and after the above change it's:
> 
>   CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release
> 
> The failure happens because our default build type is RelWithDebInfo
> which of course doesn't exist.
> 
> I didn't change anything else and we don't set this variable anywhere in
> our cmake files.
> 
> I guess I can go in and set this by hand, but anyone have any ideas why
> it disappeared, and if this is a bug?
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake




More information about the CMake mailing list