Commit 43c4ba2d authored by Matthias Vallentin's avatar Matthias Vallentin

Support specifying test as component in FindCAF

This patch makes it possible to look for the include directories of the
unit test suite. The CMake command

        find_package(CAF core io test)

now adds CAF_INCLUDE_DIR_TEST to the list of includes directories and
also appends it to CAF_INCLUDE_DIRS.
parent c97d73e4
...@@ -24,6 +24,8 @@ foreach (comp ${CAF_FIND_COMPONENTS}) ...@@ -24,6 +24,8 @@ foreach (comp ${CAF_FIND_COMPONENTS})
string(TOUPPER "${comp}" UPPERCOMP) string(TOUPPER "${comp}" UPPERCOMP)
if ("${comp}" STREQUAL "core") if ("${comp}" STREQUAL "core")
set(HDRNAME "caf/all.hpp") set(HDRNAME "caf/all.hpp")
elseif ("${comp}" STREQUAL "test")
set(HDRNAME "caf/test/unit_test.hpp")
else () else ()
set(HDRNAME "caf/${comp}/all.hpp") set(HDRNAME "caf/${comp}/all.hpp")
endif () endif ()
...@@ -59,7 +61,7 @@ foreach (comp ${CAF_FIND_COMPONENTS}) ...@@ -59,7 +61,7 @@ foreach (comp ${CAF_FIND_COMPONENTS})
endif() endif()
# look for (.dll|.so|.dylib) file, again giving hints for non-installed CAFs # look for (.dll|.so|.dylib) file, again giving hints for non-installed CAFs
# skip probe_event as it is header only # skip probe_event as it is header only
if (NOT ${comp} STREQUAL "probe_event") if (NOT ${comp} STREQUAL "probe_event" AND NOT ${comp} STREQUAL "test")
if (CAF_ROOT_DIR) if (CAF_ROOT_DIR)
set(library_hints "${CAF_ROOT_DIR}/lib") set(library_hints "${CAF_ROOT_DIR}/lib")
endif () endif ()
......
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