summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FPHSA/required_and_optional_components.cmake
blob: 836dcac9dc68975f2a942ad86207d1b1938e0a85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
find_package(UseComponents COMPONENTS Comp1 Comp2 OPTIONAL_COMPONENTS Comp3)

if (NOT UseComponents_FOUND)
  message (FATAL_ERROR "package UseComponents Not Found.")
endif()
if (NOT UseComponents_Comp1_FOUND)
  message (FATAL_ERROR "package UseComponents, component Comp1 not found.")
endif()
if (NOT UseComponents_Comp2_FOUND)
  message (FATAL_ERROR "package UseComponents, component Comp2 not found.")
endif()
if (UseComponents_Comp3_FOUND)
  message (FATAL_ERROR "package UseComponents, component Comp2 unexpectedly found.")
endif()