diff --git a/src/common/conditional_compilation/CMakeLists.txt b/src/common/conditional_compilation/CMakeLists.txt index b0a0f2835fb..876558cea5e 100644 --- a/src/common/conditional_compilation/CMakeLists.txt +++ b/src/common/conditional_compilation/CMakeLists.txt @@ -22,7 +22,13 @@ elseif(SELECTIVE_BUILD STREQUAL "ON") endif() find_host_package (Python3 REQUIRED COMPONENTS Interpreter) - file(GLOB STAT_FILES ${SELECTIVE_BUILD_STAT}) + file(TO_CMAKE_PATH ${SELECTIVE_BUILD_STAT} CMAKE_SELECTIVE_BUILD_STAT) + + file(GLOB STAT_FILES ${CMAKE_SELECTIVE_BUILD_STAT}) + + if(NOT STAT_FILES) + message(FATAL_ERROR "SELECTIVE_BUILD_STAT (${SELECTIVE_BUILD_STAT}) path doesn't contain valid csv files!") + endif() target_compile_definitions(${TARGET_NAME} INTERFACE SELECTIVE_BUILD)