MantisBT - CMake
View Issue Details
0010738CMakeCMakepublic2010-05-20 07:552013-07-01 09:37
cbielow 
Brad King 
normalmajoralways
closedfixed 
CMake-2-8 
CMake 2.8.10CMake 2.8.10 
0010738: CMake should warn when a different version of CMake is run on an existing build tree.
Hi,

I just encountered that when configuring a CMake project with Cmake 2.6
and then calling CMake 2.8 on that, that "CMAKE_SIZEOF_VOID_P" will not be defined.
I don't know what else is affected by updating the version without deleting every trace of CMake configured files, but "CMAKE_SIZEOF_VOID_P" is definitely one of them.

A minimal CMakeLists.txt example is attached.

I called:

mkdir test_build
cd test_build
"c:\Program Files (x86)\CMake 2.6_\bin\cmake.exe" -G "Visual Studio 9 2008" ..\test

"c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .


The last call will give:
C:\dev\test_build>cmake .
CMake Error at CMakeLists.txt:9 (message):
  'CMAKE_SIZEOF_VOID_P' is undefined. Thus you should delete CMakeFiles (the
  directory) and the CMakeCache.txt and rerun CMake again! This is some weird
  CMake bug that seems to appear when updating the CMake version.
-- Configuring incomplete, errors occurred!


No tags attached.
txt CMakeLists.txt (638) 2010-05-20 07:55
https://public.kitware.com/Bug/file/3131/CMakeLists.txt
Issue History
2010-05-20 07:55cbielowNew Issue
2010-05-20 07:55cbielowFile Added: CMakeLists.txt
2010-05-20 07:56cbielowNote Added: 0020796
2010-05-20 08:12Bill HoffmanNote Added: 0020797
2010-05-20 09:15cbielowNote Added: 0020799
2010-05-20 09:38Bill HoffmanSummaryCMAKE_SIZEOF_VOID_P undefined when calling 2.8 on 2.6er project => CMake should warn when a different version of CMake is run on an existing build tree.
2010-05-20 09:38Bill HoffmanNote Added: 0020800
2010-05-20 09:39Bill HoffmanStatusnew => assigned
2010-05-20 09:39Bill HoffmanAssigned To => Brad King
2012-08-13 10:44Brad KingStatusassigned => backlog
2012-08-13 10:44Brad KingNote Added: 0030556
2013-02-18 09:43Brad KingNote Added: 0032326
2013-02-18 09:43Brad KingStatusbacklog => resolved
2013-02-18 09:43Brad KingResolutionopen => fixed
2013-02-18 09:43Brad KingFixed in Version => CMake 2.8.10
2013-02-18 09:43Brad KingTarget Version => CMake 2.8.10
2013-07-01 09:37Robert MaynardNote Added: 0033427
2013-07-01 09:37Robert MaynardStatusresolved => closed

Notes
(0020796)
cbielow   
2010-05-20 07:56   
ohh I forgot:

C:\dev\test_build>"c:\Program Files (x86)\CMake 2.6_\bin\cmake.exe" --version
cmake version 2.6-patch 2

C:\dev\test_build>"c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" --version
cmake version 2.8.1
(0020797)
Bill Hoffman   
2010-05-20 08:12   
You can not do that. With a new version of CMake, you must start with a clean build tree, this just is not supported.
(0020799)
cbielow   
2010-05-20 09:15   
So can you at least issue a warning?
Some users might not even know that their CMake was updated when the admin is in charge of the machine.
This might lead to very weird behaviour...
(0020800)
Bill Hoffman   
2010-05-20 09:38   
I changed the subject.
(0030556)
Brad King   
2012-08-13 10:44   
Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0032326)
Brad King   
2013-02-18 09:43   
This issue has been addressed in CMake 2.8.10 by this change:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7195aca5 [^]

Now each version of CMake computes its own platform information.
(0033427)
Robert Maynard   
2013-07-01 09:37   
Closing resolved issues that have not been updated in more than 4 months.