GNUMakeJobServerAware-check.cmake 653 B

1234567891011121314151617
  1. set(BUILD_DIR "${RunCMake_BINARY_DIR}/GNUMakeJobServerAware-build")
  2. function(check target regex)
  3. file(STRINGS ${BUILD_DIR}/${target} lines
  4. REGEX ${regex}
  5. )
  6. list(LENGTH lines len)
  7. if(len EQUAL 0)
  8. message(FATAL_ERROR "Could not find matching lines '${regex}' in ${BUILD_DIR}/${target}")
  9. endif()
  10. endfunction()
  11. check("/CMakeFiles/Foo.dir/build.make" [[\+cd (/d )?"?.*"? && "?.*"? --build "?.*"?]])
  12. check("/CMakeFiles/Foo.dir/build.make" [[\+cd (/d )?"?.*"? && "?.*"? --install "?.*"?]])
  13. check("/CMakeFiles/Foo.dir/build.make" [[\+cd (/d )?"?.*"? && "?.*"? -E touch "?.*"?]])
  14. check("/CMakeFiles/Foo.dir/build.make" [[\+"?.*"? -E true]])