message(FATAL_ERROR"Unknown keywords given to cmake_print_properties(): \"${CPP_UNPARSED_ARGUMENTS}\"")
return()
endif()
if(NOTCPP_PROPERTIES)
message(FATAL_ERROR"Required argument PROPERTIES missing in cmake_print_properties() call")
return()
endif()
set(mode)
set(items)
set(keyword)
if(CPP_TARGETS)
set(items${CPP_TARGETS})
set(mode${mode}TARGETS)
set(keywordTARGET)
endif()
if(CPP_SOURCES)
set(items${CPP_SOURCES})
set(mode${mode}SOURCES)
set(keywordSOURCE)
endif()
if(CPP_TESTS)
set(items${CPP_TESTS})
set(mode${mode}TESTS)
set(keywordTEST)
endif()
if(CPP_DIRECTORIES)
set(items${CPP_DIRECTORIES})
set(mode${mode}DIRECTORIES)
set(keywordDIRECTORY)
endif()
if(CPP_CACHE_ENTRIES)
set(items${CPP_CACHE_ENTRIES})
set(mode${mode}CACHE_ENTRIES)
set(keywordCACHE)
endif()
if(NOTmode)
message(FATAL_ERROR"Mode keyword missing in cmake_print_properties() call, must be one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES")
return()
endif()
list(LENGTHmodemodeLength)
if("${modeLength}"GREATER1)
message(FATAL_ERROR"Multiple mode keyword used in cmake_print_properties() call, it must be exactly one of TARGETS SOURCES TESTS DIRECTORIES CACHE_ENTRIES PROPERTIES")
return()
endif()
set(msg"\n")
foreach(item${items})
set(itemExistsTRUE)
if(keywordSTREQUAL"TARGET")
if(NOTTARGET${item})
set(itemExistsFALSE)
string(APPENDmsg"\n No such TARGET \"${item}\"!\n\n")
endif()
endif()
if(itemExists)
string(APPENDmsg" Properties for ${keyword} ${item}:\n")