I found the solution by using SET_TARGET_PROPERTIES within XCODE_ATTRIBUTE_.
set_target_properties(${PROJECT_NAME}
PROPERTIES
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "YES"
)
Question
I can not find any documentation regarding Xcode ONLY_ACTIVE_ARCH flag.
Is it possible to set it with cmake?
Solution
I found the solution by using SET_TARGET_PROPERTIES within XCODE_ATTRIBUTE_.
set_target_properties(${PROJECT_NAME}
PROPERTIES
XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "YES"
)