Skip to content

Commit 69b2192

Browse files
Merge #1545: cmake: Do not set CTEST_TEST_TARGET_ALIAS
f87a358 cmake: Do not set `CTEST_TEST_TARGET_ALIAS` (Hennadii Stepanov) Pull request description: An alias for the "test" target can be confusing for the downstream project. For instance, when integrating using `add_subdirectory(secp256k1 EXCLUDE_FROM_ALL)` (see hebasto/bitcoin#192), test binaries are not being built by default. But the `check` alias target is exposed to the downstream project build system, which in turn fails: ``` $ make -C build check ... Unable to find executable: /home/hebasto/git/bitcoin/build/src/secp256k1/src/exhaustive_tests 3/3 Test #3: exhaustive_tests .................***Not Run 0.00 sec 0% tests passed, 3 tests failed out of 3 Total Test time (real) = 0.03 sec The following tests FAILED: 1 - noverify_tests (Not Run) 2 - tests (Not Run) 3 - exhaustive_tests (Not Run) Errors while running CTest ... ``` This PR fixes this issue by deleting the `CTEST_TEST_TARGET_ALIAS` usage. ACKs for top commit: real-or-random: utACK f87a358 Tree-SHA512: ccf3f30939cf1747471ea15260f7caa6dad3f510e5771245ecbfbef3cc0b0e7c8ac551519d0892bf2544c91467d8d67d2c6e6bc52f56c384b174b88bcf377d4a
2 parents 5dd637f + f87a358 commit 69b2192

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,6 @@ if(SECP256K1_BUILD_CTIME_TESTS)
273273
unset(msan_enabled)
274274
endif()
275275

276-
# Ask CTest to create a "check" target (e.g., make check) as alias for the "test" target.
277-
# CTEST_TEST_TARGET_ALIAS is not documented but supposed to be user-facing.
278-
# See: https://gitlab.kitware.com/cmake/cmake/-/commit/816c9d1aa1f2b42d40c81a991b68c96eb12b6d2
279-
set(CTEST_TEST_TARGET_ALIAS check)
280276
include(CTest)
281277
# We do not use CTest's BUILD_TESTING because a single toggle for all tests is too coarse for our needs.
282278
mark_as_advanced(BUILD_TESTING)

0 commit comments

Comments
 (0)