Skip to content

Commit

Permalink
exclude pdfwriter testing from git archives (#244)
Browse files Browse the repository at this point in the history
* .gitattributes file ignoring PDFWriterTesting

* other way around

* condition cmake to check for existance of PDFWriterTesting to add subdirectory, so itll work well in archives, now that there's no PDFWriterTesting there
  • Loading branch information
galkahana authored Dec 27, 2023
1 parent 4ed314d commit 3b70e12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# exclude tests from exported git archives
PDFWriterTesting export-ignore
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ endif(NOT USE_BUNDLED)

ADD_SUBDIRECTORY(PDFWriter)

if(PROJECT_IS_TOP_LEVEL)
if(PROJECT_IS_TOP_LEVEL AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/PDFWriterTesting)
# avoid installing the testing lib altogether when included in another project.
# it's annoying when in parent all, and more annoying to then get the tests added
# to the parent project ctest.
enable_testing()
ADD_SUBDIRECTORY(PDFWriterTesting)
endif(PROJECT_IS_TOP_LEVEL)
endif()

include(InstallRequiredSystemLibraries)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
Expand Down

0 comments on commit 3b70e12

Please sign in to comment.