| 1 | # WSLC CLI Unit Tests |
| 2 | |
| 3 | file(GLOB_RECURSE WSLC_TEST_SOURCES CONFIGURE_DEPENDS |
| 4 | ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp |
| 5 | ) |
| 6 | |
| 7 | file(GLOB_RECURSE WSLC_TEST_HEADERS CONFIGURE_DEPENDS |
| 8 | ${CMAKE_CURRENT_SOURCE_DIR}/*.h |
| 9 | ) |
| 10 | |
| 11 | # Add the sources to the parent wsltests target. |
| 12 | # This ensures they're compiled into the main test binary. |
| 13 | target_sources(wsltests PRIVATE ${WSLC_TEST_SOURCES} ${WSLC_TEST_HEADERS}) |
| 14 | |
| 15 | # N.B. These sources are compiled into wsltests, which is defined in the parent |
| 16 | # directory. Source file properties are scoped to the directory that sets them, |
| 17 | # so they would be ignored here. The precompiled header comes from the target |
| 18 | # instead, via target_precompile_headers(wsltests REUSE_FROM common). |
| 19 | |
| 20 | # Add include directories needed for WSLC tests. |
| 21 | target_include_directories(wsltests PRIVATE |
| 22 | ${CMAKE_SOURCE_DIR}/test |
| 23 | ${CMAKE_SOURCE_DIR}/test/windows |
| 24 | ${CMAKE_SOURCE_DIR}/test/windows/wslc |
| 25 | ${CMAKE_SOURCE_DIR}/src/windows/wslc/core |
| 26 | ${CMAKE_SOURCE_DIR}/src/windows/wslc/commands |
| 27 | ${CMAKE_SOURCE_DIR}/src/windows/wslc/arguments |
| 28 | ${CMAKE_SOURCE_DIR}/src/windows/wslc/services |
| 29 | ${CMAKE_SOURCE_DIR}/src/windows/wslc/tasks |
| 30 | ) |