Merge topic 'test_cpack_symlinks'

5f686b8a Tests: Add case for CPack source package with symlinks
aca1d93b cpack: Disable CMake Cygwin legacy warning while packaging
This commit is contained in:
Brad King 2015-04-06 08:58:14 -04:00 committed by CMake Topic Stage
commit 9ddbacdb74
5 changed files with 38 additions and 0 deletions

View File

@ -203,6 +203,9 @@ int main (int argc, char const* const* argv)
cmgg.SetCMakeInstance(&cminst);
cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
cmMakefile* globalMF = cmlg->GetMakefile();
#if defined(__CYGWIN__)
globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
#endif
bool cpackConfigFileSpecified = true;
if ( cpackConfigFile.empty() )

View File

@ -204,6 +204,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)

View File

@ -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()

View File

@ -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.