https://github.com/Kitware/CMake
Raw File
Tip revision: c69d4b177fb3f6ebd22cddec919dbe1c30f43714 authored by Brad King on 11 March 2021, 14:23:18 UTC
CMake 3.20.0-rc4
Tip revision: c69d4b1
genex_LINK_LANG_AND_ID-validation.cmake

if (NOT VALID_LANG)
  set (VALID_LANG C)
endif()
if (NOT INVALID_LANG)
  set (INVALID_LANG CXX)
endif()
if (NOT TYPE)
  set (TYPE EXE)
endif()

if (NOT actual_stdout MATCHES "DIR_${VALID_LANG}_${TYPE}")
  set (RunCMake_TEST_FAILED "Not found expected 'DIR_${VALID_LANG}_${TYPE}'.\n")
endif()
if (actual_stdout MATCHES "DIR_${INVALID_LANG}_${TYPE}")
  if (RunCMake_TEST_FAILED)
    string (APPEND RunCMake_TEST_FAILED "\n")
  endif()
  string (APPEND RunCMake_TEST_FAILED "Found unexpected 'DIR_${INVALID_LANG}_${TYPE} '.")
endif()
if (actual_stdout MATCHES "DIR_(${VALID_LANG}|${INVALID_LANG})_BADID_${TYPE}")
  if (RunCMake_TEST_FAILED)
    string (APPEND RunCMake_TEST_FAILED "\n")
  endif()
  string (APPEND RunCMake_TEST_FAILED "Found unexpected 'DIR_(${VALID_LANG}|${INVALID_LANG})_BADID_${TYPE}'.")
endif()
back to top