summaryrefslogtreecommitdiffstats
path: root/Tests/Module/WriteCompilerDetectionHeader
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-10-06 13:36:56 (GMT)
committerBrad King <brad.king@kitware.com>2021-10-06 14:36:39 (GMT)
commit3add62462cfd91ad8f73bbbdab3f5e4e72c50a98 (patch)
treeff3504ba447378b5f450599a9e26c39ab354921b /Tests/Module/WriteCompilerDetectionHeader
parent5c4424e5b7d014eae7fc6951d4af32102f198306 (diff)
downloadCMake-3add62462cfd91ad8f73bbbdab3f5e4e72c50a98.zip
CMake-3add62462cfd91ad8f73bbbdab3f5e4e72c50a98.tar.gz
CMake-3add62462cfd91ad8f73bbbdab3f5e4e72c50a98.tar.bz2
Xcode: Fix detection of default language standard when given -std= flags
If one uses `CFLAGS='-std=...'` or `CXXFLAGS='-std=...'` then the given `-std=` flag(s) will always be used. That effectively changes the compiler default standard level and extension settings. Fix the Xcode generator's compiler id logic to preserve any `-std=` flag so that the proper defaults are detected. This problem was exposed by commit 4a0485be7f (cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic, 2021-05-29), which changed the logic to not pass any `-std=` flag if the standard level and extension settings requested by the project match the default (`stdIt <= defaultStdIt` became `stdIt < defaultStdIt`). The new logic assumes the detected default standard matches what will actually happen when the project is generated.
Diffstat (limited to 'Tests/Module/WriteCompilerDetectionHeader')
0 files changed, 0 insertions, 0 deletions