ソースを参照

instrumentation: Update tests and documentation for FASTBuild support

Fixes: #27184
Martin Duffy 4 ヶ月 前
コミット
903d35353f

+ 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,
 information and system diagnostic information during the configure, generate,
 build, test and install steps for a CMake project.
 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
 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
 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``
   * ``postInstall``
   * ``postTest``
   * ``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``
 ``options``
   A list of strings used to enable certain optional behavior, including the
   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}
 add_RunCMake_test(FileAPI -DPython_EXECUTABLE=${Python_EXECUTABLE}
                           -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}
                           -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}
                           -DCMake_TEST_JSON_SCHEMA=${CMake_TEST_JSON_SCHEMA})
                           -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)
   add_RunCMake_test(Instrumentation)
 endif()
 endif()
 add_RunCMake_test(ConfigDir)
 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)
 instrument(cmake-command-custom-content-bad-content NO_WARN)
 
 
 # Test make/ninja hooks
 # 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.
   # FIXME(#27079): This does not work for MSYS Makefiles.
   set(Skip_BUILD_MAKE_PROGRAM_Case 1)
   set(Skip_BUILD_MAKE_PROGRAM_Case 1)
 elseif(RunCMake_GENERATOR STREQUAL "NMake Makefiles")
 elseif(RunCMake_GENERATOR STREQUAL "NMake Makefiles")