diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e129901f92..01462ab233 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,11 @@ include(InstallHelpers) include(PreventInTreeBuilds) include(Util) +if(NOT PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) + # Auto-create a .gitignore in the specified "build" directory. + file(GENERATE OUTPUT .gitignore CONTENT "*") +endif() + #------------------------------------------------------------------------------- # User settings #------------------------------------------------------------------------------- |