MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0013603 | CMake | CMake | public | 2012-10-24 07:12 | 2013-03-04 08:38 |
Reporter | David Weese | ||||
Assigned To | Brad King | ||||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Apple | OS | Mac OS X | OS Version | 10.8 |
Product Version | CMake 2.8.9 | ||||
Target Version | CMake 2.8.11 | Fixed in Version | CMake 2.8.11 | ||
Summary | 0013603: Absolute path missing in ReRunCMake.make created by the Xcode generator | ||||
Description | Hi all, we observed a bug in the CMakeScripts created by the Xcode generator. It is related to subprojects that depend on another. The problem is a missing absolute path to CMakeFiles/cmake.check_cache in a makefile. As a result it is not possible to build a target from a subproject as the ZERO_CHECK target cannot find cmake.check_cache and always assumes that it needs to rerun cmake. This bug only occurs in the makefiles created by the Xcode generator. The Unix Makefiles generator works fine. I fixed the bug in the sources of cmake where the wrong Makefile is created and recompiled a binary which works for us. See the diff in the Additional Information below. Cheers, David Bug details: When cmake is called to create an Xcode project, it will create a CMakeFiles/cmake.check_cache in the root build-folder. It also creates for each subproject a CMakeScripts/ReRunCMake.make Makefile, e.g. core/CMakeScripts/ReRunCMake.make, which looks like: # Generated by CMake, DO NOT EDIT CMakeFiles/cmake.check_cache: \ /Users/weese/seqan2/core/demos/CMakeLists.txt\ /Users/weese/seqan2/core/demos/howto/CMakeLists.txt\ /Users/weese/seqan2/core/demos/howto/scores/CMakeLists.txt\ /Users/weese/seqan2/core/demos/tutorial/CMakeLists.txt\ ... The problem is that this makfile is not executed in the root build-folder, but in the subproject folder where there is no CMakeFiles/cmake.check_cache file. Appending an absolute path in front of "CMakeFiles/cmake.check_cache" fixes the problem, this is also done by the Unix Makefile generator. | ||||
Steps To Reproduce | Just execute the following lines to check out SeqAn, generate an Xcode project, open the core/demos subproject: svn co http://svn.seqan.de/seqan/trunk [^] seqan-trunk mkdir seqan-trunk/xcode cd seqan-trunk/xcode cmake .. -G Xcode open core/demos/seqan_core_demos.xcodeproj Now select the "alignment" target and try to build. It will always rerun cmake and then interrupt. When opening the main project seqan.xcodeproj everything works fine. | ||||
Additional Information | I could fix the problem by adding the following line into Source/cmGlobalXCodeGenerator.cxx which prepends an absolute path to the root folder containing the CMakeFiles/cmake.check_cache target. diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e8ab38f..960eb2c 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -495,6 +495,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile( (this->CurrentReRunCMakeMakefile.c_str()); makefileStream.SetCopyIfDifferent(true); makefileStream << "# Generated by CMake, DO NOT EDIT\n"; + makefileStream << mf->GetHomeOutputDirectory() << '/'; makefileStream << cmake::GetCMakeFilesDirectoryPostSlash(); makefileStream << "cmake.check_cache: "; for(std::vector<std::string>::const_iterator i = lfiles.begin(); | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | 0001-Xcode-Fix-ReRunCMake.make-path-to-cmake.check_cache-.patch (1,564) 2012-10-24 14:14 https://public.kitware.com/Bug/file/4531/0001-Xcode-Fix-ReRunCMake.make-path-to-cmake.check_cache-.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2012-10-24 07:12 | David Weese | New Issue | |||
2012-10-24 13:35 | Brad King | Assigned To | => Brad King | ||
2012-10-24 13:35 | Brad King | Status | new => assigned | ||
2012-10-24 13:35 | Brad King | Target Version | => CMake 2.8.11 | ||
2012-10-24 14:14 | Brad King | File Added: 0001-Xcode-Fix-ReRunCMake.make-path-to-cmake.check_cache-.patch | |||
2012-10-24 14:15 | Brad King | Note Added: 0031306 | |||
2012-10-25 14:39 | David Weese | Note Added: 0031330 | |||
2012-10-25 15:17 | Brad King | Note Added: 0031331 | |||
2012-10-25 15:17 | Brad King | Status | assigned => resolved | ||
2012-10-25 15:17 | Brad King | Resolution | open => fixed | ||
2012-10-25 15:17 | Brad King | Fixed in Version | => CMake 2.8.11 | ||
2013-03-04 08:38 | Robert Maynard | Note Added: 0032491 | |||
2013-03-04 08:38 | Robert Maynard | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|