CMake Xcode attributes are not set correctly when one project is a subproject of another
When I set xcode attributes in a cmake project such as
set(CMAKE_XCODE_ATTRIBUTE_VALID_ARCHS "x86_x64")
they are set correctly when I build that project. However, if I make another project that sits above that project, such as with a CMakeLists.txt that does
cmake_minimum_required(VERSION 2.8)
project(all)
add_subdirectory(project1)
add_subdirectory(project2)
The attributes will not be set correctly for the subprojects when you look at the settings in Xcode, they appear to be using the Xcode defaults in this case. I have tried this with a few different attributes and they all seem to exhibit the same problem.
I have created a simple repro file attached. Generate project1 or project2, and the Valid Archs setting will be set correctly, but if you generate the 'all' project above it, it will be the default for all projects.
This is tested with 3.10RC.
Thanks!
Edited by Brad King