summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Po-Chuan Hsieh <sunpoet@sunpoet.net>2020-06-03 02:18:31 +0800
committerGravatar GitHub <noreply@github.com>2020-06-02 14:18:31 -0400
commit8faf20461f6ad0f99d23270067fb28234f224ad9 (patch)
tree1e5f0dee8f7ce68a629de335f538ca8847a1b890 /CMakeLists.txt
parent2069dc796aa255f7c82861c6e83b82d001ceef4a (diff)
Exclude empty directories (#697)
install(DIRECTORY...) creates all directories. If there's is no matching files, it becomes an empty directory. The three empty directories are absl/copts, absl/strings/testdata and absl/time/internal/cctz/testdata. It is a workaround as cmake does not have an option to exclude empty directories. Reference: https://gitlab.kitware.com/cmake/cmake/-/issues/19189
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c654c892..c406616b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,5 +172,7 @@ if(ABSL_ENABLE_INSTALL)
FILES_MATCHING
PATTERN "*.inc"
PATTERN "*.h"
+ PATTERN "copts" EXCLUDE
+ PATTERN "testdata" EXCLUDE
)
endif() # ABSL_ENABLE_INSTALL