build: ignore hidden source files in the scratch directory

Fixes https://gitlab.com/nsnam/ns-3-dev/-/issues/684
This commit is contained in:
Gabriel Ferreira
2022-06-21 15:42:09 -03:00
parent 0eaca37e23
commit 36bd103c49
2 changed files with 8 additions and 7 deletions

View File

@@ -62,7 +62,7 @@ function(create_scratch source_files)
endfunction()
# Scan *.cc files in ns-3-dev/scratch and build a target for each
file(GLOB single_source_file_scratches CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cc)
file(GLOB single_source_file_scratches CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/[^.]*.cc)
foreach(scratch_src ${single_source_file_scratches})
create_scratch(${scratch_src})
endforeach()
@@ -93,7 +93,7 @@ foreach(subdir ${scratch_subdirectories})
else()
# Otherwise we pick all the files in the subdirectory
# and create a scratch for them automatically
file(GLOB scratch_sources CONFIGURE_DEPENDS ${subdir}/*.cc)
file(GLOB scratch_sources CONFIGURE_DEPENDS ${subdir}/[^.]*.cc)
create_scratch("${scratch_sources}")
endif()
endforeach()