Преглед на файлове

instrumentation: Update tests and documentation for FASTBuild support

Fixes: #27184
Martin Duffy преди 4 месеца
родител
ревизия
903d35353f
променени са 3 файла, в които са добавени 11 реда и са изтрити 7 реда
  1. 6 5
      Help/manual/cmake-instrumentation.7.rst
  2. 1 1
      Tests/RunCMake/CMakeLists.txt
  3. 4 1
      Tests/RunCMake/Instrumentation/RunCMakeTest.cmake

+ 6 - 5
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

+ 1 - 1
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)

+ 4 - 1
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")