From 4f4a2ce44cf2c19d98b461cfc472a1efac6d42d3 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Mon, 10 Sep 2018 21:56:51 +0100 Subject: [PATCH] Add exclusions file that controls published sources Add lines to the sources.exclude file to select paths and wildcards that will be excluded from source tarballs. See the tar --exclude-from=FILE option for syntax. If a source directory that is used to build targets is included then those targets should be defined in a CMakeLists.txt file in the same directory and the following syntax should be used in the parent CMakeLists.txt script to ensue the parent CMakeLists.txt file remains valid when the excluded directory is not present: if (EXITS ${CMAKE_SOURCE_DIR}/optional-source-dir AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/optional-source-dir) add_subdirectory (optional-source-dir) endif () --- CMakeLists.txt | 4 +++- sources.exclude | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 sources.exclude diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a7f0b58b..2eefc415e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -887,7 +887,9 @@ endif (WIN32) # # sub-directories # -add_subdirectory (samples) +if (EXISTS ${CMAKE_SOURCE_DIR}/samples AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/samples) + add_subdirectory (samples) +endif () if (WSJT_GENERATE_DOCS) add_subdirectory (doc) endif (WSJT_GENERATE_DOCS) diff --git a/sources.exclude b/sources.exclude new file mode 100644 index 000000000..5c8dd34d1 --- /dev/null +++ b/sources.exclude @@ -0,0 +1,3 @@ +.git +sources.exclude +samples