https://github.com/Kitware/CMake
Revision d52b5f8835a1768dc3b16e8b8cc465b5f80098ad authored by Marco Nolden on 28 January 2015, 15:25:53 UTC, committed by Brad King on 28 January 2015, 15:32:06 UTC
The "No rule to make target" error message of gmake is not correctly
recognized since GNU make changed the quoting style in commit 23c2b99e9d
(Convert all "`'" quotes to "''" per new GNU Coding Standard guidelines,
2012-03-04).  Fix our regex to match both old and new quoting styles.
1 parent 57622bd
Raw File
Tip revision: d52b5f8835a1768dc3b16e8b8cc465b5f80098ad authored by Marco Nolden on 28 January 2015, 15:25:53 UTC
ctest_build: Update GNU make error message matching (#15379)
Tip revision: d52b5f8
CMakeCopyright.cmake
if(CMAKE_VERSION MATCHES "\\.(20[0-9][0-9])[0-9][0-9][0-9][0-9](-|$)")
  set(version_year "${CMAKE_MATCH_1}")
  set(copyright_line_regex "^Copyright 2000-(20[0-9][0-9]) Kitware")
  file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/../Copyright.txt" copyright_line
    LIMIT_COUNT 1 REGEX "${copyright_line_regex}")
  if(copyright_line MATCHES "${copyright_line_regex}")
    set(copyright_year "${CMAKE_MATCH_1}")
    if(copyright_year LESS version_year)
      message(FATAL_ERROR "Copyright.txt contains\n"
        " ${copyright_line}\n"
        "but the current version year is ${version_year}.")
    else()
      message(STATUS "PASSED: Copyright.txt contains\n"
        " ${copyright_line}\n"
        "and the current version year is ${version_year}.")
    endif()
  else()
    message(FATAL_ERROR "Copyright.txt has no Copyright line of expected format!")
  endif()
else()
  message(STATUS "SKIPPED: CMAKE_VERSION does not know the year: ${CMAKE_VERSION}")
endif()
back to top