Tests: Add case for CPack source package with symlinks
This commit is contained in:
parent
aca1d93bd9
commit
5f686b8a6b
|
@ -203,6 +203,11 @@ add_RunCMake_test(install)
|
|||
add_RunCMake_test(CPackInstallProperties)
|
||||
add_RunCMake_test(ExternalProject)
|
||||
add_RunCMake_test(CTestCommandLine)
|
||||
# Only run this test on unix platforms that support
|
||||
# symbolic links
|
||||
if(UNIX)
|
||||
add_RunCMake_test(CPackSymlinks)
|
||||
endif()
|
||||
|
||||
set(IfacePaths_INCLUDE_DIRECTORIES_ARGS -DTEST_PROP=INCLUDE_DIRECTORIES)
|
||||
add_RunCMake_test(IfacePaths_INCLUDE_DIRECTORIES TEST_DIR IfacePaths)
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
include(RunCMake)
|
||||
|
||||
function(run_cpack_symlink_test)
|
||||
set(RunCMake_TEST_NO_CLEAN TRUE)
|
||||
set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/SrcSymlinks-build")
|
||||
set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/SrcSymlinks")
|
||||
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
||||
file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}")
|
||||
file(MAKE_DIRECTORY "${RunCMake_TEST_SOURCE_DIR}")
|
||||
run_cmake_command(SrcSymlinksTar
|
||||
${CMAKE_COMMAND} -E chdir ${RunCMake_TEST_SOURCE_DIR}
|
||||
${CMAKE_COMMAND} -E tar xvf ${RunCMake_SOURCE_DIR}/testcpacksym.tar
|
||||
)
|
||||
run_cmake(SrcSymlinksCMake)
|
||||
run_cmake_command(SrcSymlinksCPack
|
||||
${CMAKE_CPACK_COMMAND} --config CPackSourceConfig.cmake
|
||||
)
|
||||
endfunction()
|
||||
|
||||
run_cpack_symlink_test()
|
|
@ -0,0 +1,10 @@
|
|||
^x CMakeLists.txt
|
||||
x cygwin/
|
||||
x cygwin/build.sh
|
||||
x cygwin/setup.patch
|
||||
x include/
|
||||
x include/src.h
|
||||
x link.h
|
||||
x real.h
|
||||
x src/
|
||||
x src/src.h$
|
Binary file not shown.
Loading…
Reference in New Issue