fish-shell/cmake
Mahmoud Al-Qudsi aaac759d9a Make test a custom target again and add top-level test targets
Even though we are using CMake's ctest for testing, we still define our
own `make test` target rather than use its default for many reasons:

 * CMake doesn't run tests in-proc or even add each tests as an
   individual node in the ninja dependency tree, instead it just bundles
   all tests into a target called `test` that always just shells out to
   `ctest`, so there are no build-related benefits to not doing that
   ourselves.
 * CMake devs insist that it is appropriate for `make test` to never
   depend on `make all`, i.e. running `make test` does not require any
   of the binaries to be built before testing.
 * The only way to have a test depend on a binary is to add a fake test
   with a name like "build_fish" that executes CMake recursively to
   build the `fish` target.
 * It is not possible to set top-level CTest options/settings such as
   CTEST_PARALLEL_LEVEL from within the CMake configuration file.
 * Circling back to the point about individual tests not being actual
   Makefile targets, CMake does not offer any way to execute a named
   test via the `make`/`ninja`/whatever interface; the only way to
   manually invoke test `foo` is to to manually run `ctest` and specify
   a regex matching `foo` as an argument, e.g. `ctest -R ^foo$`... which
   is really crazy.

With this patch, it is now possible to execute any single test by name,
by invoking the build directly, e.g. to run the `universal.fish` check:
`cmake --build build --target universal.fish` or
`ninja -C build universal.fish`. Unfortunately, this is not integrated
into the Makefile wrapper, so `make universal.fish` won't work (although
this can potentially be hacked around).
2021-08-29 08:56:12 +02:00
..
checks Optimize away a str2wcs_internal check 2020-09-07 18:05:18 -05:00
Benchmark.cmake Use lowercase CMake function names 2020-03-14 16:11:35 -07:00
CheckIncludeFiles.cmake CMake/CheckIncludeFiles: use correct variable name 2021-06-06 18:10:03 +08:00
ConfigureChecks.cmake Replace strerror/sys_errlist after fork with our own errors (#8234) 2021-08-20 17:17:01 +02:00
Docs.cmake cmake: Stop copying css files 2021-03-02 17:04:47 +01:00
gettext.cmake Group certain cmake targets into folders 2021-03-21 13:29:41 -07:00
Install.cmake Remove cmake test_prep target 2021-08-29 08:56:12 +02:00
Mac.cmake Suppress linker warnings in Mac debug builds 2020-09-27 11:35:16 -07:00
MacApp.cmake Group certain cmake targets into folders 2021-03-21 13:29:41 -07:00
PCRE2.cmake Add CMake variable FISH_USE_SYSTEM_PCRE2 2020-04-28 18:30:40 -07:00
Tests.cmake Make test a custom target again and add top-level test targets 2021-08-29 08:56:12 +02:00
Version.cmake Use lowercase CMake function names 2020-03-14 16:11:35 -07:00