diff options
Diffstat (limited to 'Tests/RunCMake/ExternalProject')
6 files changed, 47 insertions, 4 deletions
diff --git a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt index 22e13bf..5fa75e8 100644 --- a/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt +++ b/Tests/RunCMake/ExternalProject/Add_StepDependencies_iface_step-stderr.txt @@ -1,5 +1,5 @@ ^CMake Error at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): - Target "MyProj-IFace" was not generated by ExternalProject_Add_StepTargets. + External project "MyProj" does not have a step "IFace". Call Stack \(most recent call first\): Add_StepDependencies_iface_step.cmake:[0-9]+ \(ExternalProject_Add_StepDependencies\) CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt b/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt index 4cb051d..928d88a 100644 --- a/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt +++ b/Tests/RunCMake/ExternalProject/NO_DEPENDS-stderr.txt @@ -2,7 +2,7 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\): Using NO_DEPENDS for "configure" step might break parallel builds Call Stack \(most recent call first\): .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\) - .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\) + .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\) .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_configure_command\) NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\) CMakeLists.txt:[0-9]+ \(include\) @@ -12,7 +12,7 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\): Using NO_DEPENDS for "build" step might break parallel builds Call Stack \(most recent call first\): .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\) - .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\) + .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\) .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_build_command\) NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\) CMakeLists.txt:[0-9]+ \(include\) @@ -22,7 +22,7 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+. \(message\): Using NO_DEPENDS for "install" step might break parallel builds Call Stack \(most recent call first\): .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_StepTargets\) - .*/Modules/ExternalProject.cmake:[0-9]+ \(ExternalProject_Add_Step\) + .*/Modules/ExternalProject.cmake:[0-9]+:EVAL:2 \(ExternalProject_Add_Step\) .*/Modules/ExternalProject.cmake:[0-9]+ \(_ep_add_install_command\) NO_DEPENDS.cmake:[0-9]+ \(ExternalProject_Add\) CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalProject/PreserveEmptyArgs-build-stdout.txt b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs-build-stdout.txt new file mode 100644 index 0000000..0e21b8f --- /dev/null +++ b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs-build-stdout.txt @@ -0,0 +1,21 @@ +.*-- Number of arguments for download: 6 +.*-- download argument 4: '' +.*-- download argument 5: 'after' +.*-- Number of arguments for update: 6 +.*-- update argument 4: '' +.*-- update argument 5: 'after' +.*-- Number of arguments for patch: 6 +.*-- patch argument 4: '' +.*-- patch argument 5: 'after' +.*-- Number of arguments for configure: 6 +.*-- configure argument 4: '' +.*-- configure argument 5: 'after' +.*-- Number of arguments for build: 6 +.*-- build argument 4: '' +.*-- build argument 5: 'after' +.*-- Number of arguments for install: 6 +.*-- install argument 4: '' +.*-- install argument 5: 'after' +.*-- Number of arguments for test: 6 +.*-- test argument 4: '' +.*-- test argument 5: 'after' diff --git a/Tests/RunCMake/ExternalProject/PreserveEmptyArgs.cmake b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs.cmake new file mode 100644 index 0000000..ded1000 --- /dev/null +++ b/Tests/RunCMake/ExternalProject/PreserveEmptyArgs.cmake @@ -0,0 +1,13 @@ +include(ExternalProject) + +set(script "${CMAKE_CURRENT_LIST_DIR}/countArgs.cmake") +ExternalProject_Add( + blankChecker + DOWNLOAD_COMMAND ${CMAKE_COMMAND} -P "${script}" download "" after + UPDATE_COMMAND ${CMAKE_COMMAND} -P "${script}" update "" after + PATCH_COMMAND ${CMAKE_COMMAND} -P "${script}" patch "" after + CONFIGURE_COMMAND ${CMAKE_COMMAND} -P "${script}" configure "" after + BUILD_COMMAND ${CMAKE_COMMAND} -P "${script}" build "" after + INSTALL_COMMAND ${CMAKE_COMMAND} -P "${script}" install "" after + TEST_COMMAND ${CMAKE_COMMAND} -P "${script}" test "" after +) diff --git a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake index caaf0d2..0d1da26 100644 --- a/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalProject/RunCMakeTest.cmake @@ -29,6 +29,10 @@ endfunction() __ep_test_with_build(MultiCommand) +set(RunCMake_TEST_OUTPUT_MERGE 1) +__ep_test_with_build(PreserveEmptyArgs) +set(RunCMake_TEST_OUTPUT_MERGE 0) + # Output is not predictable enough to be able to verify it reliably # when using the various different Visual Studio generators if(NOT RunCMake_GENERATOR MATCHES "Visual Studio") diff --git a/Tests/RunCMake/ExternalProject/countArgs.cmake b/Tests/RunCMake/ExternalProject/countArgs.cmake new file mode 100644 index 0000000..ee6429a --- /dev/null +++ b/Tests/RunCMake/ExternalProject/countArgs.cmake @@ -0,0 +1,5 @@ +message(STATUS "Number of arguments for ${CMAKE_ARGV3}: ${CMAKE_ARGC}") +math(EXPR last "${CMAKE_ARGC} - 1") +foreach(n RANGE 4 ${last}) + message(STATUS "${CMAKE_ARGV3} argument ${n}: '${CMAKE_ARGV${n}}'") +endforeach() |