Skip to content

Commit d58b541

Browse files
committed
Organize CMakeLists.txt for test pipelines
1 parent 15eb083 commit d58b541

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

tests/pdal/capi/CMakeLists.txt

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,24 @@
11
set(TARGET test_pdal_c)
22

3-
configure_file(PipelineTest.c.in ${CMAKE_CURRENT_SOURCE_DIR}/PipelineTest.c)
4-
configure_file(PointViewTest.c.in ${CMAKE_CURRENT_SOURCE_DIR}/PointViewTest.c)
5-
configure_file(PointViewCollectionTest.c.in ${CMAKE_CURRENT_SOURCE_DIR}/PointViewCollectionTest.c)
6-
7-
set(CONFIG
8-
PipelineTest.c.in
9-
PointViewCollectionTest.c.in
10-
PointViewTest.c.in
11-
)
12-
13-
source_group("Config Files" FILES ${CONFIG})
3+
set(CONFIGS )
4+
set(SOURCES main.c)
5+
set(HEADERS )
6+
set(DEPENDENCIES pdal_c)
147

15-
set(SOURCES
16-
main.c
17-
PipelineTest.c
18-
PointViewCollectionTest.c
19-
PointViewTest.c
8+
set(TESTS
9+
PipelineTest
10+
PointViewCollectionTest
11+
PointViewTest
2012
)
2113

22-
set(HEADERS )
14+
foreach(TEST ${TESTS})
15+
configure_file(${TEST}.c.in ${CMAKE_CURRENT_SOURCE_DIR}/${TEST}.c)
2316

24-
set(DEPENDENCIES pdal_c)
17+
list(APPEND CONFIGS ${TEST}.c.in)
18+
list(APPEND SOURCES ${TEST}.c)
19+
endforeach()
2520

21+
source_group("Config Files" FILES ${CONFIGS})
2622
include_directories(${CMAKE_SOURCE_DIR}/source)
2723

2824
add_executable(${TARGET} ${SOURCES} ${HEADERS} ${CONFIG})

0 commit comments

Comments
 (0)