RunCMakeTest.cmake 813 B

1234567891011121314151617181920212223
  1. include(RunCMake)
  2. set(RunCMake_TEST_OPTIONS
  3. "-DCMAKE_CROSSCOMPILING_EMULATOR=${PSEUDO_EMULATOR}")
  4. run_cmake(CrosscompilingEmulatorProperty)
  5. run_cmake(TryRun)
  6. run_cmake(AddTest)
  7. function(CustomCommandGenerator_run_and_build case)
  8. # Use a single build tree for a few tests without cleaning.
  9. set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
  10. set(RunCMake_TEST_NO_CLEAN 1)
  11. set(RunCMake_TEST_OPTIONS
  12. "-DCMAKE_CROSSCOMPILING_EMULATOR=${PSEUDO_EMULATOR_CUSTOM_COMMAND}")
  13. file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
  14. file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
  15. run_cmake(${case})
  16. run_cmake_command(${case}-build ${CMAKE_COMMAND} --build .)
  17. endfunction()
  18. CustomCommandGenerator_run_and_build(AddCustomCommand)
  19. CustomCommandGenerator_run_and_build(AddCustomTarget)