diff options
author | Brad King <brad.king@kitware.com> | 2015-05-26 13:23:57 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-05-26 13:23:57 (GMT) |
commit | 129bf45dee4d6fc4cca8103235013b60464660f2 (patch) | |
tree | f4bc6fb1faafb74d47c947ba24d8fcb0149dbb5c /Tests | |
parent | 36386413969149fde706c04dec478a3de50c5a28 (diff) | |
parent | 0de47b05f74bd12d41b46634f00aea3bcb6f3678 (diff) | |
download | CMake-129bf45dee4d6fc4cca8103235013b60464660f2.zip CMake-129bf45dee4d6fc4cca8103235013b60464660f2.tar.gz CMake-129bf45dee4d6fc4cca8103235013b60464660f2.tar.bz2 |
Merge topic 'ExternalData-no-symlinks'
0de47b05 ExternalData: Add option to disable use of symlinks
Diffstat (limited to 'Tests')
4 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt index b6e24d2..f07ab71 100644 --- a/Tests/Module/ExternalData/CMakeLists.txt +++ b/Tests/Module/ExternalData/CMakeLists.txt @@ -53,3 +53,4 @@ ExternalData_Add_Target(Data1) add_subdirectory(Data2) add_subdirectory(Data3) add_subdirectory(Data4) +add_subdirectory(DataNoSymlinks) diff --git a/Tests/Module/ExternalData/DataNoSymlinks/CMakeLists.txt b/Tests/Module/ExternalData/DataNoSymlinks/CMakeLists.txt new file mode 100644 index 0000000..d3df7fc --- /dev/null +++ b/Tests/Module/ExternalData/DataNoSymlinks/CMakeLists.txt @@ -0,0 +1,8 @@ +set(ExternalData_NO_SYMLINKS 1) +ExternalData_Add_Test(DataNoSymlinks + NAME DataNoSymlinksCheck + COMMAND ${CMAKE_COMMAND} + -D Data=DATA{Data.dat} + -P ${CMAKE_CURRENT_SOURCE_DIR}/DataNoSymlinksCheck.cmake + ) +ExternalData_Add_Target(DataNoSymlinks) diff --git a/Tests/Module/ExternalData/DataNoSymlinks/Data.dat.md5 b/Tests/Module/ExternalData/DataNoSymlinks/Data.dat.md5 new file mode 100644 index 0000000..70e39bd --- /dev/null +++ b/Tests/Module/ExternalData/DataNoSymlinks/Data.dat.md5 @@ -0,0 +1 @@ +8c018830e3efa5caf3c7415028335a57 diff --git a/Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake b/Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake new file mode 100644 index 0000000..2be3571 --- /dev/null +++ b/Tests/Module/ExternalData/DataNoSymlinks/DataNoSymlinksCheck.cmake @@ -0,0 +1,6 @@ +if(NOT EXISTS "${Data}") + message(SEND_ERROR "Input file:\n ${Data}\ndoes not exist!") +endif() +if(IS_SYMLINK "${Data}") + message(SEND_ERROR "Input file:\n ${Data}\nis a symlink but should not be!") +endif() |