File: CheckCMakeCommandExists.cmake

package info (click to toggle)
dcmtk 3.6.9-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,648 kB
  • sloc: ansic: 426,874; cpp: 318,177; makefile: 6,401; sh: 4,341; yacc: 1,026; xml: 482; lex: 321; perl: 277
file content (12 lines) | stat: -rw-r--r-- 515 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
# Helper macro that checks whether a given CMake command exists or not
macro(CHECK_CMAKE_COMMAND_EXISTS commandname)
  message(STATUS "Looking for CMake command ${commandname}")
  string(TOUPPER ${commandname} commandname_upper)
  if(COMMAND ${commandname})
    set(HAVE_${commandname_upper} TRUE)
    message(STATUS "Looking for CMake command ${commandname} - found")
  else()
    set(HAVE_${commandname_upper} FALSE)
    message(STATUS "Looking for CMake command ${commandname} - not found")
  endif()
endmacro()