diff options
Diffstat (limited to 'Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake')
-rw-r--r-- | Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake b/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake index 19c09c8..c3725a4 100644 --- a/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake +++ b/Tests/RunCMake/BuildDepends/CustomCommandDepfile.cmake @@ -24,6 +24,17 @@ add_library(toplib STATIC toplib.c) add_subdirectory(DepfileSubdir) +set(TEST_SPACE 1) +if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") + execute_process(COMMAND "${CMAKE_MAKE_PROGRAM}" no_such_target --version RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out) + if(NOT res EQUAL 0 OR NOT out MATCHES "GNU") + set(TEST_SPACE 0) + endif() +endif() +if(TEST_SPACE) + add_subdirectory(DepfileSubdirWithSpace) +endif() + add_custom_command( OUTPUT toplib2.c DEPFILE toplib2.c.d |