| 1 |
cmake_minimum_required(VERSION 3.14) |
| 2 |
|
| 3 |
# Subdirectory CMakeLists.txt without targets |
| 4 |
set(CSD ${CMAKE_CURRENT_SOURCE_DIR}) |
| 5 |
set(CBD ${CMAKE_CURRENT_BINARY_DIR}) |
| 6 |
|
| 7 |
# Register a file path relative to the build directory |
| 8 |
set(DirPropFileRel "DirPropFileRel.txt") |
| 9 |
writeCleanFile("${CBD}/${DirPropFileRel}") |
| 10 |
set_directory_properties(PROPERTIES ADDITIONAL_CLEAN_FILES ${DirPropFileRel}) |
| 11 |
addCleanFile("${CBD}/${DirPropFileRel}") |
| 12 |
|
| 13 |
# Register an absolute file path |
| 14 |
set(DirPropFileAbs "${CBD}/DirPropFileAbs.txt") |
| 15 |
writeCleanFile("${DirPropFileAbs}") |
| 16 |
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${DirPropFileAbs}) |
| 17 |
addCleanFile("${DirPropFileAbs}") |