From dc3e5a233b329d25b75f5010340cb18fc3f19f34 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 18 Sep 2021 22:09:31 -0700 Subject: [PATCH] Generate Xcode schemes in CMake This makes Xcode a little more pleasant, since we suppress generating a bunch of schemes for tests. --- CMakeLists.txt | 3 +++ cmake/Tests.cmake | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59a75069f..6ecb1d0b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 11) set(DEFAULT_BUILD_TYPE "RelWithDebInfo") +# Generate Xcode schemas (but not for tests). +set(CMAKE_XCODE_GENERATE_SCHEME 1) + # Use the default flags (#6296) but remove -DNDEBUG so that asserts remain enabled. string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO diff --git a/cmake/Tests.cmake b/cmake/Tests.cmake index f3e7fb2e4..2aeb4d127 100644 --- a/cmake/Tests.cmake +++ b/cmake/Tests.cmake @@ -95,6 +95,9 @@ configure_file(build_tools/littlecheck.py littlecheck.py COPYONLY) # Copy pexpect_helper.py configure_file(build_tools/pexpect_helper.py pexpect_helper.py COPYONLY) +# Suppress generating Xcode schemes for all tests, there's too many. +set(CMAKE_XCODE_GENERATE_SCHEME 0) + # CMake being CMake, you can't just add a DEPENDS argument to add_test to make it depend on any of # your binaries actually being built before `make test` is executed (requiring `make all` first), # and the only dependency a test can have is on another test. So we make building fish and