summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/File_Generate/UseSourcePermissions.cmake
diff options
context:
space:
mode:
authorAsit Dhal <dhal.asitk@gmail.com>2020-10-28 10:07:57 (GMT)
committerAsit Dhal <dhal.asitk@gmail.com>2020-12-21 11:16:16 (GMT)
commitc3385dd8bd7c78cf03d7e52ae0f49e8216cdaaea (patch)
tree429c6d6e88db90402670eef5e288f7f4a1bb29ca /Tests/RunCMake/File_Generate/UseSourcePermissions.cmake
parentc89514a6a47b678dddb703c302def4fe56abe275 (diff)
downloadCMake-c3385dd8bd7c78cf03d7e52ae0f49e8216cdaaea.zip
CMake-c3385dd8bd7c78cf03d7e52ae0f49e8216cdaaea.tar.gz
CMake-c3385dd8bd7c78cf03d7e52ae0f49e8216cdaaea.tar.bz2
file(GENERATE): Support options to manipulate file permissions
Fixes: #15653
Diffstat (limited to 'Tests/RunCMake/File_Generate/UseSourcePermissions.cmake')
-rw-r--r--Tests/RunCMake/File_Generate/UseSourcePermissions.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/File_Generate/UseSourcePermissions.cmake b/Tests/RunCMake/File_Generate/UseSourcePermissions.cmake
new file mode 100644
index 0000000..7cca9bf
--- /dev/null
+++ b/Tests/RunCMake/File_Generate/UseSourcePermissions.cmake
@@ -0,0 +1,11 @@
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/$<LOWER_CASE:$<CONFIG>>/usesourcepermissions.txt"
+ INPUT "${CMAKE_CURRENT_SOURCE_DIR}/input.txt"
+ USE_SOURCE_PERMISSIONS
+ )
+
+add_custom_target(checkUseSourcePermissions ALL
+ COMMAND ${CMAKE_COMMAND}
+ -DsourceFile=${CMAKE_CURRENT_SOURCE_DIR}/input.txt
+ -DgeneratedFile=${CMAKE_CURRENT_BINARY_DIR}/$<LOWER_CASE:$<CONFIG>>/usesourcepermissions.txt
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/UseSourcePermissionsVerify.cmake"
+ )