FYI - I'm using Microsoft Visual C++ 2010 Express and this variable is not set by CMake for my project (I'm using the visual studio 10 generator).
Looking at Windows-cl.cmake for CMake-2.8.4, it appears that CMAKE_USING_VC_FREE_TOOLS is only set when using the NMake Makefiles generator. If I copy the block of code that tests if this is a free compiler from Microsoft to my own CMakeLists, it correctly identifies my compiler and sets CMAKE_USING_VC_FREE_TOOLS to 1. My tests are not exhaustive as I don't have the Pro version of VS2010 to test against. But this may be a bug in the compiler detection routines. It would appear that the check for CMAKE_USING_VC_FREE_TOOLS should be run for both the NMake Makefiles and the Visual Studio Project generators. Please clarify if I am wrong in this assumption. -kt > -----Original Message----- > From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of > Daniel Pfeifer > Sent: Wednesday, May 11, 2011 3:00 AM > To: cmake@cmake.org > Subject: Re: [CMake] Express Edition > > CMake does a check for the compiler. But not for the IDE. > > If you are using the free compiler that is included in C++ Express, > then the CMAKE_USING_VC_FREE_TOOLS variable is set. > > It is however possible to use the free compiler in the professional IDE > and vice versa. So using CMAKE_USING_VC_FREE_TOOLS is probably not > reliable in this case. > > cheers, Daniel > > Am Mittwoch, den 11.05.2011, 07:48 +0400 schrieb Yuri Timenkov: > > Isn't CMAKE_USING_VC_FREE_TOOLS works? You can also look for files > > containing builder configuration in BuildDir/CMakeFiles directory. > > > > Anyways, you can write your own test to check for VC version. > > > > On Sat, May 7, 2011 at 3:37 PM, QbProg <tho...@gmail.com> wrote: > > Hello there, > > is there a quick & clean way to detect if we are using a > > Visual C++ > > express edition with the MSVC generator? > > A variable of something like that. > > I would like to exclude solution folders in that case. > > > > Thank you, > > Qb > > > > _______________________________________________ > 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 _______________________________________________ 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