The way source groups are sorted in Xcode seems off.

Here’s a sample file (using v2.8.12):

cmake_minimum_required(VERSION 2.8)
project(SourceGroupTest)
set(SOURCES
    ./Zebra/file.c
    ./Snake/file.c
    ./Dog/file.c
)
source_group(Snake REGULAR_EXPRESSION "Snake/.*")
source_group(Zebra REGULAR_EXPRESSION "Zebra/.*")
source_group(Dog REGULAR_EXPRESSION "Dog/.*")
add_executable(${PROJECT_NAME} ${SOURCES})

Full download here:
https://www.dropbox.com/s/ikrlhslqk3yvsay/XcodeSourceGroups.zip

I would expect that the order of the groups be Snake, Zebra, Dog, however it's 
Zebra, Snake, Dog.

I played around with this and it seems that the order of SOURCES dictates the 
order of the groups. If I rearrange the listings of the files in SOURCES, it 
affects the group order. But this seems counterintuitive.

Shouldn’t the groups by sorted based on the order of calls to source_group()?

Kevin
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to