summaryrefslogtreecommitdiffstats
path: root/CMakeCPack.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-26 12:49:28 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-26 12:49:28 (GMT)
commitfa23f66ad584883b3d117ca953b6539507c377ee (patch)
tree6e022e8c38fa0a9bf5d59d45adc0b8ded5774f47 /CMakeCPack.cmake
parentc40d130034278e28964929e8d61f3280945b7531 (diff)
downloadCMake-fa23f66ad584883b3d117ca953b6539507c377ee.zip
CMake-fa23f66ad584883b3d117ca953b6539507c377ee.tar.gz
CMake-fa23f66ad584883b3d117ca953b6539507c377ee.tar.bz2
CMakeCPack: Exclude version-control-specific files from source package
Diffstat (limited to 'CMakeCPack.cmake')
-rw-r--r--CMakeCPack.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index a0aacb4..dc9f0ba 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -245,5 +245,23 @@ configure_file("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in"
"${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY)
set(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake")
+set(CPACK_SOURCE_IGNORE_FILES
+ # Files specific to version control.
+ "/\\\\.git/"
+ "/\\\\.gitattributes$"
+ "/\\\\.github/"
+ "/\\\\.gitignore$"
+ "/\\\\.hooks-config$"
+
+ # Cygwin package build.
+ "/\\\\.build/"
+
+ # Temporary files.
+ "\\\\.swp$"
+ "\\\\.#"
+ "/#"
+ "~$"
+ )
+
# include CPack model once all variables are set
include(CPack)