summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject/XcodeOptimizationFlags-check.cmake
blob: f5595b315ffc18ab06a7fec041fc0c5759d7867d (plain)
1
2
3
4
5
6
7
foreach(level 1 2 3 s fast)
  file(STRINGS ${RunCMake_TEST_BINARY_DIR}/XcodeOptimizationFlags.xcodeproj/project.pbxproj actual-${level}
       REGEX "GCC_OPTIMIZATION_LEVEL = ${level};" LIMIT_COUNT 1)
  if(NOT actual-${level})
    message(SEND_ERROR "Optimization level '${level}' not found in Xcode project.")
  endif()
endforeach()