Skip to content
Snippets Groups Projects
Commit 60c9c315 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Added fatal error when no files where found with GET_SOURCE_FILES or APPEND_SOURCE_FILES.

parent c3308e2d
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,10 @@ macro(GET_SOURCE_FILES SOURCE_FILES) ...@@ -19,6 +19,10 @@ macro(GET_SOURCE_FILES SOURCE_FILES)
file(GLOB GET_SOURCE_FILES_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.cpp) file(GLOB GET_SOURCE_FILES_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.cpp)
set(${SOURCE_FILES} ${GET_SOURCE_FILES_HEADERS} ${GET_SOURCE_FILES_TEMPLATES} ${GET_SOURCE_FILES_SOURCES}) set(${SOURCE_FILES} ${GET_SOURCE_FILES_HEADERS} ${GET_SOURCE_FILES_TEMPLATES} ${GET_SOURCE_FILES_SOURCES})
list(LENGTH ${SOURCE_FILES} NUM_FILES)
if(${NUM_FILES} EQUAL 0)
message(FATAL_ERROR "No source files found in ${DIR}")
endif()
# Adapt DIR var to backslash syntax of SOURCE_GROUP cmd # Adapt DIR var to backslash syntax of SOURCE_GROUP cmd
if(${ARGC} EQUAL 2) if(${ARGC} EQUAL 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment