MantisBT - CMake
View Issue Details
0013380CMakeCMakepublic2012-07-06 07:462016-06-10 14:31
Jay Sistar 
Kitware Robot 
highmajoralways
closedmoved 
Apple MacintoshMac OS X10.7.4
CMake 2.8.8 
 
0013380: Xcode paths generated incorrectly
This is problem is seen in 2 places:

1. CMake leaves the product paths (paths to library files and executables) blank, so it's impossible to tell which has been build, and which hasn't.

2. Many paths in Xcode must be relative paths from the Xcode project for Xcode to work properly. CMake accounts for this nuance, but it does so as if the project file were at the root of the source. Doing any out of source builds (the common case, I believe) results in the inability to open files in sub-projects (projects that were included by a CMake "add_subdirectory(project_dir)" that has a CMakeLists.txt with a "project(project_name)" statement at the top of it, which were most likely external to the project, and through the use of git submodules or similar mechanisms, were included as part of the build of the outer project.
I've attached a file called "TheMainApp.tar.bz2" It consists of an application and 2 libraries. The application is at the root.

1. On a Mac with Xcode: from the root ("TheMainApp/") do a "mkdir build; cd build; cmake -G Xcode .."
2. Do a "open TheMainApp.xcodeproj"
3. In the file browser panel (on the left side of the Xcode window) Look at the "Product" folder, as well as the "ConsolePrinter" and "Sleeper" folders. You will see that they are in red.

Under normal circumstances, the Product folder files will be red until they are built, but because the path doesn't exist (that can be seen in Xcode 4 or later in the panel on the right side of the window) these Products will always be red.
It should be noted that everything still builds correctly, it's only the IDE that has problems, but that seriously attenuates development speed in Xcode when using CMake.

To whomever picks-up this ticket: Thank you very much for the great product that is CMake! It has made my cross platform development much easier.
Xcode
bz2 TheMainApp.tar.bz2 (15,207) 2012-07-06 07:46
https://public.kitware.com/Bug/file/4381/TheMainApp.tar.bz2
Issue History
2012-07-06 07:46Jay SistarNew Issue
2012-07-06 07:46Jay SistarFile Added: TheMainApp.tar.bz2
2012-07-06 07:49Jay SistarTag Attached: Xcode
2016-06-10 14:28Kitware RobotNote Added: 0042082
2016-06-10 14:28Kitware RobotStatusnew => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042082)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.