Generate Xcode schemes in CMake

This makes Xcode a little more pleasant, since we suppress generating a
bunch of schemes for tests.
This commit is contained in:
ridiculousfish 2021-09-18 22:09:31 -07:00
parent 971073d429
commit dc3e5a233b
2 changed files with 6 additions and 0 deletions

View file

@ -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

View file

@ -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