View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015346 | CMake | CMake | public | 2015-01-13 05:41 | 2015-06-01 08:38 | ||||
Reporter | Daniele E. Domenichelli | ||||||||
Assigned To | Ben Boeckel | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 3.1 | ||||||||
Target Version | CMake 3.1.1 | Fixed in Version | CMake 3.1.1 | ||||||
Summary | 0015346: Xcode generator default target is no longer "ALL_BUILD" | ||||||||
Description | Since CMake 3.1, the order of the targets is changed and therefore the default target for Xcode generator is no longer "ALL_BUILD" if there is at least one install command. Also some other custom targets were moved to the top of the list. | ||||||||
Steps To Reproduce | Using this small project: cmake_minimum_required(VERSION 2.8.9) project(FOO) install(CODE "message(FATAL_ERROR \"This fatal error should not happen\")") - CMake 3.0.2 * "xcodebuild -list" prints Targets: ALL_BUILD ZERO_CHECK install * "xcodebuild" executes the "ALL_BUILD" target * "cmake --build ." executes the "ALL_BUILD" target - CMake 3.1 * "xcodebuild -list" prints Targets: install ALL_BUILD ZERO_CHECK * "xcodebuild" executes the "install" target (and fails) * "cmake --build ." executes the "ALL_BUILD" target Building the project with "cmake --build ." still works because it calls the correct target, but "xcodebuild" fails because the "install" target is called instead of the "ALL_BUILD" one. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0037675) Brad King (manager) 2015-01-13 08:44 |
Thanks, Daniele. Can you bisect this, please? |
(0037677) Daniele E. Domenichelli (developer) 2015-01-13 13:54 |
I don't have a mac, but I managed to borrow one... This appears to be the commit to blame: cmTarget: use a hash_map for cmTargets typedef http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9c9b66 [^] Reverting it fixes the problem. |
(0037680) Brad King (manager) 2015-01-13 16:21 |
The VS generator uses a special ordering rule for its targets in cmGlobalVisualStudioGenerator::TargetCompare: http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmGlobalVisualStudioGenerator.cxx;hb=v3.1.0#l827 [^] Xcode needs to do the same thing instead of depending on the cmTargets map order. |
(0037721) Ben Boeckel (developer) 2015-01-16 16:46 |
Just for clarification, was it also wrong in 3.0 if a target was named "AAA"? Rudimentary testing here shows it is. So not completely my fault, just an exposed bug :) . |
(0037725) Ben Boeckel (developer) 2015-01-16 17:41 |
Merged into next based on v3.1.0 as 'xcode-target-sort'. |
(0037734) Brad King (manager) 2015-01-19 08:41 |
Re 0015346:0037725: The original commit exposed another bug, which I've now fixed: Xcode: Fix early termination on per-config source file error http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c0ff542c [^] Then I rebased your original commit on the fix. The revised version is: Xcode: Sort targets deterministically and with ALL_BUILD first http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e0176e2 [^] |
(0037735) Brad King (manager) 2015-01-19 09:23 |
I've queued this for 3.1.1. |
(0038855) Robert Maynard (manager) 2015-06-01 08:38 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-01-13 05:41 | Daniele E. Domenichelli | New Issue | |
2015-01-13 08:44 | Brad King | Note Added: 0037675 | |
2015-01-13 08:44 | Brad King | Target Version | => CMake 3.1.1 |
2015-01-13 13:54 | Daniele E. Domenichelli | Note Added: 0037677 | |
2015-01-13 16:20 | Brad King | Assigned To | => Ben Boeckel |
2015-01-13 16:20 | Brad King | Status | new => assigned |
2015-01-13 16:21 | Brad King | Note Added: 0037680 | |
2015-01-16 16:46 | Ben Boeckel | Note Added: 0037721 | |
2015-01-16 17:41 | Ben Boeckel | Note Added: 0037725 | |
2015-01-19 08:41 | Brad King | Note Added: 0037734 | |
2015-01-19 09:23 | Brad King | Note Added: 0037735 | |
2015-01-19 09:23 | Brad King | Status | assigned => resolved |
2015-01-19 09:23 | Brad King | Resolution | open => fixed |
2015-01-19 09:23 | Brad King | Fixed in Version | => CMake 3.1.1 |
2015-06-01 08:38 | Robert Maynard | Note Added: 0038855 | |
2015-06-01 08:38 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |