From cb389f9a09d4cf4d75be97fa060829d78a07c3e0 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 13 May 2014 09:28:53 -0700 Subject: [PATCH] Ignore generated files. --- .gitignore | 5 +++-- CMakeLists.txt | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a6ef1d86..88882270 100644 --- a/.gitignore +++ b/.gitignore @@ -3,14 +3,15 @@ /doc/doxyxml /doc/html /Testing -/*.cmake -/format-test +/*-test /install_manifest.txt /tinyformat_speed_test *~ *.a *.zip cmake_install.cmake +CPack*Config.cmake +CTestTestfile.cmake CMakeCache.txt CMakeFiles Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt index d89f53ee..798e022f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,10 +182,11 @@ if (EXISTS .gitignore) file (STRINGS ".gitignore" lines) LIST(REMOVE_ITEM lines /doc/html) foreach (line ${lines}) + string(REPLACE "." "[.]" line "${line}") string(REPLACE "*" ".*" line "${line}") set(ignored_files ${ignored_files} "${line}$" "${line}/") endforeach () - set(ignored_files ${ignored_files} /.git /breathe /format-benchmark /sphinx) + set(ignored_files ${ignored_files} /.git /breathe /format-benchmark sphinx/) set(CPACK_SOURCE_GENERATOR ZIP) set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})