Commit 9710952b authored by Sebastian Woelke's avatar Sebastian Woelke

Throw an error if no component is set for FindCAF

parent 3348fd12
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Use this module as follows: # Use this module as follows:
# #
# find_package(CAF) # find_package(CAF [COMPONENTS <core|io|opencl|...>*] [REQUIRED])
# #
# Variables used by this module (they can change the default behaviour and need # Variables used by this module (they can change the default behaviour and need
# to be set before calling find_package): # to be set before calling find_package):
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
# CAF_LIBRARY_$C Library file for component $C # CAF_LIBRARY_$C Library file for component $C
# CAF_INCLUDE_DIR_$C Include path for component $C # CAF_INCLUDE_DIR_$C Include path for component $C
if(CAF_FIND_COMPONENTS STREQUAL "")
message(FATAL_ERROR "FindCAF requires at least one COMPONENT.")
endif()
# iterate over user-defined components # iterate over user-defined components
foreach (comp ${CAF_FIND_COMPONENTS}) foreach (comp ${CAF_FIND_COMPONENTS})
# we use uppercase letters only for variable names # we use uppercase letters only for variable names
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment