Skip to content

Commit

Permalink
GHI #20 Add cmake abort message for better debugging
Browse files Browse the repository at this point in the history
Signed-off-by: doodspav <[email protected]>
  • Loading branch information
doodspav committed Nov 1, 2023
1 parent 9bcc78a commit 36f4a06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/cmake/CreateTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ function(_create_test)
# such as IMPORTED_LOCATION for the library path and set
# INTERFACE_INCLUDE_DIRECTORIES to the directories containing any
# necessary header files.
if(NOT TARGET "${dep_target}")
message(FATAL_ERROR "Encountered non-target dependency '${dep_target}' for target ${target} (check source comment)")
endif()
get_target_property(type "${dep_target}" TYPE)
if(type STREQUAL "SHARED_LIBRARY")
list(APPEND deps_paths "$<TARGET_FILE_DIR:${dep_target}>")
Expand Down

0 comments on commit 36f4a06

Please sign in to comment.