MantisBT - CMake
View Issue Details
0015111CMakeCMakepublic2014-08-26 09:322015-05-04 09:05
normanius 
Brad King 
normalminoralways
closedfixed 
OS X10.9
CMake 3.0.1 
CMake 3.0.2CMake 3.0.2 
0015111: “File reference” warnings when building a CMake project with Xcode 6
Xcode 6.0 (Beta 4) newly warns the developer if a source file is member of multiple groups/targets.

CMake, in order to work properly, adds the main source file to several targets: my_target_name, ALL_BUILD, ZERO_CHECK. Hence, I get the following superfluous warning messages:

2014-08-26 13:47:48.406 xcodebuild[14099:1007] warning: The file reference for "CMakeLists.txt" is a member of multiple groups ("ALL_BUILD" and "ZERO_CHECK"); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path.

2014-08-26 13:47:48.406 xcodebuild[14099:1007] warning: The file reference for "CMakeLists.txt" is a member of multiple groups ("ZERO_CHECK" and "example"); this indicates a malformed project. Only the membership in one of the groups will be preserved (but membership in targets will be unaffected). If you want a reference to the same file in more than one group, please add another reference to the same path.
The problem is reproducible with the minimal example attached to this bug report.

cd minimal_example_xcode6_problem
mkdir build && cd build
cmake -G Xcode ..
xcodebuild
- Xcode 6.0 (6A267n), it's a beta version
- Warning does not show up for Xcode 5.1.1
- Warning does not show up if I remove the duplicated entries in the proejct.pbxproj file for the targets ALL_BUILD and ZERO_CHECK.
No tags attached.
related to 0013935closed Brad King CMake generates corrupt Xcode project files due to illegal reuse of target dependencies 
related to 0015272closed Kitware Robot “File reference” warnings when building a CMake project with resources in Xcode 6 
zip minimal_example_xcode6_problem.zip (1,958) 2014-08-26 09:32
https://public.kitware.com/Bug/file/5234/minimal_example_xcode6_problem.zip
zip minimal_example_xcode6_problem_duplicated_files.zip (2,761) 2014-08-27 10:30
https://public.kitware.com/Bug/file/5236/minimal_example_xcode6_problem_duplicated_files.zip
Issue History
2014-08-26 09:32normaniusNew Issue
2014-08-26 09:32normaniusFile Added: minimal_example_xcode6_problem.zip
2014-08-27 10:29normaniusNote Added: 0036683
2014-08-27 10:30normaniusFile Added: minimal_example_xcode6_problem_duplicated_files.zip
2014-09-03 10:55Brad KingRelationship addedrelated to 0013935
2014-09-03 10:56Brad KingAssigned To => Brad King
2014-09-03 10:56Brad KingStatusnew => assigned
2014-09-03 10:56Brad KingTarget Version => CMake 3.1
2014-09-03 13:02Brad KingNote Added: 0036724
2014-09-11 10:15Rolf Eike BeerTarget VersionCMake 3.1 => CMake 3.0.2
2014-09-11 10:22Brad KingStatusassigned => resolved
2014-09-11 10:22Brad KingResolutionopen => fixed
2014-09-11 10:22Brad KingFixed in Version => CMake 3.0.2
2014-12-01 11:16Brad KingRelationship addedrelated to 0015272
2015-05-04 09:05Robert MaynardNote Added: 0038682
2015-05-04 09:05Robert MaynardStatusresolved => closed

Notes
(0036683)
normanius   
2014-08-27 10:29   
Added another minimal example that shows a similar warning if the same file is added to two different targets: minimal_example_xcode6_problem_duplicated_files.zip.
(0036724)
Brad King   
2014-09-03 13:02   
Fixed:

 Xcode: Generate per-target file references
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cf92fe2d [^]
(0038682)
Robert Maynard   
2015-05-04 09:05   
Closing resolved issues that have not been updated in more than 4 months.