summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-13 14:59:12 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-13 14:59:12 (GMT)
commit558a6f1f920defdfcd7651fba3a85fded84d6a63 (patch)
treef3688cd6f0f4a73a2b8ca6801a6b284f5f90bf12
parent978d796e8dbb437ff9ebf34dadb123a9583c6d9b (diff)
parent3bade75b02cd4989d0be5efc6547439eade22be9 (diff)
downloadCMake-558a6f1f920defdfcd7651fba3a85fded84d6a63.zip
CMake-558a6f1f920defdfcd7651fba3a85fded84d6a63.tar.gz
CMake-558a6f1f920defdfcd7651fba3a85fded84d6a63.tar.bz2
Merge topic 'cmake-copyright-year'
3bade75 Help: Parse Copyright.txt instead of using current year 2bbf6bd Copyright.txt: Add test to check year range 3ee67d0 Copyright.txt: Update year range to end in 2013 621ba1f cmake-gui: Parse Copyright.txt instead of duplicating notice 993b685 bootstrap: Parse Copyright.txt instead of duplicating notice
-rw-r--r--Copyright.txt3
-rw-r--r--Source/QtDialog/CMakeLists.txt5
-rw-r--r--Tests/CMakeCopyright.cmake22
-rw-r--r--Tests/CMakeLists.txt3
-rw-r--r--Utilities/Sphinx/CMakeLists.txt9
-rw-r--r--Utilities/Sphinx/conf.py.in3
-rwxr-xr-xbootstrap4
7 files changed, 44 insertions, 5 deletions
diff --git a/Copyright.txt b/Copyright.txt
index 83a2482..9342249 100644
--- a/Copyright.txt
+++ b/Copyright.txt
@@ -1,5 +1,6 @@
CMake - Cross Platform Makefile Generator
-Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
+Copyright 2000-2013 Kitware, Inc.
+Copyright 2000-2011 Insight Software Consortium
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 88a9fc9..ee0b831 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -111,12 +111,15 @@ if(Qt_BIN_DIR)
endif()
if(APPLE)
+ file(STRINGS "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
+ LIMIT_COUNT 1 REGEX "^Copyright 2000-20[0-9][0-9] Kitware")
+
set_target_properties(cmake-gui PROPERTIES
OUTPUT_NAME ${CMAKE_BUNDLE_NAME}
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${CMAKE_BUNDLE_VERSION}"
# TBD: MACOSX_BUNDLE_BUNDLE_VERSION "${CMAKE_BUNDLE_VERSION}"
- MACOSX_BUNDLE_COPYRIGHT "Copyright 2000-2013 Kitware, Inc."
+ MACOSX_BUNDLE_COPYRIGHT "${copyright_line}"
)
# Create a symlink in the build tree to provide a "cmake-gui" next
diff --git a/Tests/CMakeCopyright.cmake b/Tests/CMakeCopyright.cmake
new file mode 100644
index 0000000..a7201e9
--- /dev/null
+++ b/Tests/CMakeCopyright.cmake
@@ -0,0 +1,22 @@
+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()
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index d4a55fc..063ad11 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -161,6 +161,9 @@ if(BUILD_TESTING)
set(CMAKE_LONG_TEST_TIMEOUT 1500)
endif()
+ add_test(NAME CMake.Copyright
+ COMMAND cmake -P ${CMAKE_CURRENT_SOURCE_DIR}/CMakeCopyright.cmake)
+
# add a bunch of standard build-and-test style tests
ADD_TEST_MACRO(CommandLineTest CommandLineTest)
ADD_TEST_MACRO(FindPackageTest FindPackageTest)
diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index 3b0b335..5e0ef87 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -36,6 +36,15 @@ elseif(NOT SPHINX_EXECUTABLE)
message(FATAL_ERROR "SPHINX_EXECUTABLE (sphinx-build) is not found!")
endif()
+set(copyright_line_regex "^Copyright (2000-20[0-9][0-9] Kitware.*)")
+file(STRINGS "${CMake_SOURCE_DIR}/Copyright.txt" copyright_line
+ LIMIT_COUNT 1 REGEX "${copyright_line_regex}")
+if(copyright_line MATCHES "${copyright_line_regex}")
+ set(conf_copyright "${CMAKE_MATCH_1}")
+else()
+ set(conf_copyright "Kitware, Inc.")
+endif()
+
set(conf_docs "${CMake_SOURCE_DIR}/Help")
set(conf_path "${CMAKE_CURRENT_SOURCE_DIR}")
set(conf_version "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
diff --git a/Utilities/Sphinx/conf.py.in b/Utilities/Sphinx/conf.py.in
index 52f4a31..ef622fd 100644
--- a/Utilities/Sphinx/conf.py.in
+++ b/Utilities/Sphinx/conf.py.in
@@ -13,7 +13,6 @@ import sys
import os
import re
import glob
-import time
sys.path.insert(0, r'@conf_path@')
@@ -21,7 +20,7 @@ source_suffix = '.rst'
master_doc = 'index'
project = 'CMake'
-copyright = '2000-%s Kitware, Inc.' % time.strftime('%Y')
+copyright = '@conf_copyright@'
version = '@conf_version@' # feature version
release = '@conf_release@' # full version string
diff --git a/bootstrap b/bootstrap
index 2d44d67..89d68d9 100755
--- a/bootstrap
+++ b/bootstrap
@@ -62,6 +62,8 @@ if [ "$cmake_version_rc" != "" ]; then
cmake_version="${cmake_version}-rc${cmake_version_rc}"
fi
+cmake_copyright="`grep '^Copyright .* Kitware' "${cmake_source_dir}/Copyright.txt"`"
+
cmake_data_dir_keyword="OTHER"
cmake_doc_dir_keyword="OTHER"
cmake_man_dir_keyword="OTHER"
@@ -402,7 +404,7 @@ Directory and file names:
# Display CMake bootstrap usage
cmake_version_display()
{
- echo "CMake ${cmake_version}, Copyright 2000-2012 Kitware, Inc."
+ echo "CMake ${cmake_version}, ${cmake_copyright}"
}
# Display CMake bootstrap error, display the log file and exit