From e933fccc7eb5400f1512fa097eca51f0dcd7c946 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Thu, 15 Sep 2022 12:32:38 -0400 Subject: Tests: document try_{compile,run} old/new signature testing Add a brief documentation blurb to the try_compile and try_run test sets on writing tests for both "old" and "new" signatures. --- Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake | 9 +++++++++ Tests/RunCMake/try_run/old_and_new_signature_tests.cmake | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake b/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake index f80d445..ac07ad3 100644 --- a/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake +++ b/Tests/RunCMake/try_compile/old_and_new_signature_tests.cmake @@ -1,3 +1,12 @@ +# These tests are performed using both the historic and the newer SOURCES +# signatures of try_compile. It is critical that they behave the same and +# produce comparable output for both signatures. Tests that cannot do this +# belong in RunCMakeTests.txt, not here. +# +# Tests here MUST include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS}) and +# use the variables defined therein appropriately. Refer to existing tests for +# examples. + run_cmake(CopyFileErrorNoCopyFile) run_cmake(NoCopyFile) run_cmake(NoCopyFile2) diff --git a/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake b/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake index 2332127..e1c1784 100644 --- a/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake +++ b/Tests/RunCMake/try_run/old_and_new_signature_tests.cmake @@ -1,3 +1,12 @@ +# These tests are performed using both the historic and the newer SOURCES +# signatures of try_run. It is critical that they behave the same and produce +# comparable output for both signatures. Tests that cannot do this belong in +# RunCMakeTests.txt, not here. +# +# Tests here MUST include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS}) and +# use the variables defined therein appropriately. Refer to existing tests for +# examples. + run_cmake(BadLinkLibraries) run_cmake(BinDirEmpty) run_cmake(BinDirRelative) -- cgit v0.12