ClickHouse/cmake/dbms_glob_sources.cmake

14 lines
524 B
CMake
Raw Normal View History

2021-10-10 01:09:17 +00:00
macro(add_glob cur_list)
file(GLOB __tmp CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${ARGN})
2021-10-10 01:09:17 +00:00
list(APPEND ${cur_list} ${__tmp})
endmacro()
macro(add_headers_and_sources prefix common_path)
2019-10-22 03:54:16 +00:00
add_glob(${prefix}_headers ${CMAKE_CURRENT_SOURCE_DIR} ${common_path}/*.h)
2019-05-22 10:16:16 +00:00
add_glob(${prefix}_sources ${common_path}/*.cpp ${common_path}/*.c ${common_path}/*.h)
endmacro()
macro(add_headers_only prefix common_path)
2019-10-22 03:54:16 +00:00
add_glob(${prefix}_headers ${CMAKE_CURRENT_SOURCE_DIR} ${common_path}/*.h)
2017-03-15 18:54:31 +00:00
endmacro()