From 903d35353f47c531422f2f0de8175f6dec95940f Mon Sep 17 00:00:00 2001 From: Martin Duffy Date: Tue, 2 Sep 2025 11:46:21 -0400 Subject: [PATCH] instrumentation: Update tests and documentation for FASTBuild support Fixes: #27184 --- Help/manual/cmake-instrumentation.7.rst | 11 ++++++----- Tests/RunCMake/CMakeLists.txt | 2 +- Tests/RunCMake/Instrumentation/RunCMakeTest.cmake | 5 ++++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Help/manual/cmake-instrumentation.7.rst b/Help/manual/cmake-instrumentation.7.rst index 60e5b20b09..a844c85f14 100644 --- a/Help/manual/cmake-instrumentation.7.rst +++ b/Help/manual/cmake-instrumentation.7.rst @@ -21,8 +21,8 @@ The CMake Instrumentation API allows for the collection of timing data, target information and system diagnostic information during the configure, generate, build, test and install steps for a CMake project. -This feature is only available for projects using the :ref:`Makefile Generators` -or the :ref:`Ninja Generators`. +This feature is only available for projects using the +:ref:`Makefile Generators`, :ref:`Ninja Generators` or :generator:`FASTBuild`. All interactions with the CMake instrumentation API must specify both an API version and a Data version. At this time, there is only one version for each of @@ -200,9 +200,10 @@ key is required, but all other fields are optional. * ``postInstall`` * ``postTest`` - ``preBuild`` and ``postBuild`` are not supported with the - :generator:`MSYS Makefiles` generator. Additionally, they will not be - triggered when the build tool is invoked by ``cmake --build``. + ``preBuild`` and ``postBuild`` are not supported when using the + :generator:`MSYS Makefiles` or :generator:`FASTBuild` generators. + Additionally, they will not be triggered when the build tool is invoked by + ``cmake --build``. ``options`` A list of strings used to enable certain optional behavior, including the diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 740e7753f4..e736057f74 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -422,7 +422,7 @@ endif() add_RunCMake_test(FileAPI -DPython_EXECUTABLE=${Python_EXECUTABLE} -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID} -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA}) -if(CMAKE_GENERATOR MATCHES "Make|Ninja") +if(CMAKE_GENERATOR MATCHES "Make|Ninja|FASTBuild") add_RunCMake_test(Instrumentation) endif() add_RunCMake_test(ConfigDir) diff --git a/Tests/RunCMake/Instrumentation/RunCMakeTest.cmake b/Tests/RunCMake/Instrumentation/RunCMakeTest.cmake index fddd4a6d42..b2699f7f3d 100644 --- a/Tests/RunCMake/Instrumentation/RunCMakeTest.cmake +++ b/Tests/RunCMake/Instrumentation/RunCMakeTest.cmake @@ -160,7 +160,10 @@ instrument(cmake-command-custom-content-bad-type NO_WARN) instrument(cmake-command-custom-content-bad-content NO_WARN) # Test make/ninja hooks -if(RunCMake_GENERATOR STREQUAL "MSYS Makefiles") +if(RunCMake_GENERATOR STREQUAL "FASTBuild") + # FIXME(#27184): This does not work for FASTBuild. + set(Skip_BUILD_MAKE_PROGRAM_Case 1) +elseif(RunCMake_GENERATOR STREQUAL "MSYS Makefiles") # FIXME(#27079): This does not work for MSYS Makefiles. set(Skip_BUILD_MAKE_PROGRAM_Case 1) elseif(RunCMake_GENERATOR STREQUAL "NMake Makefiles")