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