diff options
author | Brad King <brad.king@kitware.com> | 2013-01-29 20:12:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-30 15:05:07 (GMT) |
commit | 9e518a8169bae33c8a971c146e29b5af20114648 (patch) | |
tree | 76b9f313e37f45dbe1b6f5172bbe4fe9bbb815fa /Tests/Module/ExternalData/Data1Check.cmake | |
parent | 175ed02207ea5fe25aa7156acb2554d706611263 (diff) | |
download | CMake-9e518a8169bae33c8a971c146e29b5af20114648.zip CMake-9e518a8169bae33c8a971c146e29b5af20114648.tar.gz CMake-9e518a8169bae33c8a971c146e29b5af20114648.tar.bz2 |
ExternalData: Allow DATA{} syntax to reference directories
Use a trailing slash to reference a directory. Require that a list
of associated files be specified to select from within the directory.
One may simply use DATA{Dir/,REGEX:.*} to reference all files but
get a directory passed on the command line.
Diffstat (limited to 'Tests/Module/ExternalData/Data1Check.cmake')
-rw-r--r-- | Tests/Module/ExternalData/Data1Check.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake index fd18cdf..972ec46 100644 --- a/Tests/Module/ExternalData/Data1Check.cmake +++ b/Tests/Module/ExternalData/Data1Check.cmake @@ -38,3 +38,9 @@ foreach(n Top A B C) message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") endif() endforeach() +foreach(n A B C) + set(file "${Directory}/${n}.dat") + if(NOT EXISTS "${file}") + message(SEND_ERROR "Input file:\n ${file}\ndoes not exist!") + endif() +endforeach() |