From e7e165d68a6e6e053f21a56e24aeaed38230119a Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Wed, 14 Sep 2016 19:44:50 -0400 Subject: [PATCH] Remove unused Bazaar and Subversion cmake files. --- CMakeModules/CreateBzrVersionHeader.cmake | 75 ------------ CMakeModules/CreateSVNVersionHeader.cmake | 61 ---------- CMakeModules/FindBazaar.cmake | 81 ------------- CMakeModules/FindSubversion.cmake | 140 ---------------------- 4 files changed, 357 deletions(-) delete mode 100644 CMakeModules/CreateBzrVersionHeader.cmake delete mode 100644 CMakeModules/CreateSVNVersionHeader.cmake delete mode 100644 CMakeModules/FindBazaar.cmake delete mode 100644 CMakeModules/FindSubversion.cmake diff --git a/CMakeModules/CreateBzrVersionHeader.cmake b/CMakeModules/CreateBzrVersionHeader.cmake deleted file mode 100644 index 2c86e5f302..0000000000 --- a/CMakeModules/CreateBzrVersionHeader.cmake +++ /dev/null @@ -1,75 +0,0 @@ -# -# This program source code file is part of KICAD, a free EDA CAD application. -# -# Copyright (C) 2010 Wayne Stambaugh -# Copyright (C) 2010-2015 Kicad Developers, see AUTHORS.txt for contributors. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, you may find one here: -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -# or you may search the http://www.gnu.org website for the version 2 license, -# or you may write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# - -macro( create_bzr_version_header _bzr_src_path ) - # If bzr is not found or an error occurs using the bzr commands to determine the repo - # version, set the build version string to "no-bzr" - set( KICAD_BUILD_VERSION "no-bzr" ) - - # Include Bazaar support to automagically create version header file. - find_package( Bazaar ) - - if( Bazaar_FOUND ) - set( _Bazaar_SAVED_LC_ALL "$ENV{LC_ALL}" ) - set( ENV{LC_ALL} C ) - - # Get the tree revision - execute_process( - COMMAND ${Bazaar_EXECUTABLE} revno --tree ${_bzr_src_path} - OUTPUT_VARIABLE _bzr_TREE_DATE - RESULT_VARIABLE _bzr_revno_result - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - if( ${_bzr_revno_result} EQUAL 0 ) - # Get more info about that revision - execute_process( - COMMAND ${Bazaar_EXECUTABLE} log -r${_bzr_TREE_DATE} ${_bzr_src_path} - OUTPUT_VARIABLE _bzr_LAST_CHANGE_LOG - ERROR_VARIABLE _bzr_log_error - RESULT_VARIABLE _bzr_log_result - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - if( ${_bzr_log_result} EQUAL 0 ) - string( REGEX REPLACE "^(.*\n)?revno: ([^ \n]+).*" - "\\2" Kicad_REPO_REVISION "${_bzr_LAST_CHANGE_LOG}" ) - string( REGEX REPLACE "^(.*\n)?committer: ([^\n]+).*" - "\\2" Kicad_REPO_LAST_CHANGED_AUTHOR "${_bzr_LAST_CHANGE_LOG}" ) - string( REGEX REPLACE "^(.*\n)?timestamp: [a-zA-Z]+ ([^ \n]+).*" - "\\2" Kicad_REPO_LAST_CHANGED_DATE "${_bzr_LAST_CHANGE_LOG}" ) - endif() - endif() - - set( ENV{LC_ALL} ${_Bazaar_SAVED_LC_ALL} ) - endif() - - # Check to make sure 'bzr log' command did not fail. Otherwise, default - # to "no-bzr" as the revision. - if( Kicad_REPO_LAST_CHANGED_DATE ) - string( REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+)" "\\1-\\2-\\3" - _kicad_bzr_date ${Kicad_REPO_LAST_CHANGED_DATE} ) - set( KICAD_BUILD_VERSION "(${_kicad_bzr_date} BZR ${Kicad_REPO_REVISION})" ) - endif() - - set( KICAD_BUILD_VERSION ${KICAD_BUILD_VERSION} ) -endmacro() diff --git a/CMakeModules/CreateSVNVersionHeader.cmake b/CMakeModules/CreateSVNVersionHeader.cmake deleted file mode 100644 index 1c6b9d952b..0000000000 --- a/CMakeModules/CreateSVNVersionHeader.cmake +++ /dev/null @@ -1,61 +0,0 @@ -macro(create_svn_version_header) - # Include Subversion support to automagically create version header file. - find_package(Subversion) - - if(Subversion_FOUND) - # Copied from the CMake module FindSubversion.cmake. The default - # version prevents generating the output files when the "svn info" - # command fails. Just fall back to using "build_version.h" for - # the version strings. - set(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}") - set(ENV{LC_ALL} C) - - execute_process( - COMMAND ${Subversion_SVN_EXECUTABLE} info ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE Kicad_WC_INFO - ERROR_VARIABLE _svn_error - RESULT_VARIABLE _svn_result - OUTPUT_STRIP_TRAILING_WHITESPACE) - - if(NOT ${_svn_result} EQUAL 0) - message(STATUS - "Using for version string.") - else(NOT ${_svn_result} EQUAL 0) - string(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" - "\\2" Kicad_WC_URL "${Kicad_WC_INFO}") - string(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" - "\\2" Kicad_WC_REVISION "${Kicad_WC_INFO}") - string(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*" - "\\2" Kicad_WC_LAST_CHANGED_AUTHOR "${Kicad_WC_INFO}") - string(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*" - "\\2" Kicad_WC_LAST_CHANGED_REV "${Kicad_WC_INFO}") - string(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*" - "\\2" Kicad_WC_LAST_CHANGED_DATE "${Kicad_WC_INFO}") - endif(NOT ${_svn_result} EQUAL 0) - - set(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL}) - endif(Subversion_FOUND) - - # Check to make sure 'svn info' command did not fail. Otherwise fallback - # to version strings defined in "/include/build_version.h". - if(Kicad_WC_LAST_CHANGED_DATE) - string(REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+).*" "\\1\\2\\3" - _kicad_svn_date ${Kicad_WC_LAST_CHANGED_DATE}) - set(KICAD_BUILD_VERSION - "(${_kicad_svn_date} SVN-R${Kicad_WC_LAST_CHANGED_REV})") - - # Definition to conditionally use date and revision returned from the - # Subversion info command instead of hand coded date and revision in - # "include/build_version.h". If subversion is not found then the date - # and version information must be manually edited. - # Directive means SVN build, program version and build version will - # reflect this. - add_definitions(-DHAVE_SVN_VERSION) - - # Generate version.h. - configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/version.h.cmake - ${CMAKE_BINARY_DIR}/version.h) - - message(STATUS "Kicad SVN build version: ${KICAD_BUILD_VERSION}") - endif(Kicad_WC_LAST_CHANGED_DATE) -endmacro(create_svn_version_header) diff --git a/CMakeModules/FindBazaar.cmake b/CMakeModules/FindBazaar.cmake deleted file mode 100644 index 91cd855d63..0000000000 --- a/CMakeModules/FindBazaar.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# -# This program source code file is part of KICAD, a free EDA CAD application. -# -# Copyright (C) 2010 Wayne Stambaugh -# Copyright (C) 2010 Kicad Developers, see AUTHORS.txt for contributors. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, you may find one here: -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -# or you may search the http://www.gnu.org website for the version 2 license, -# or you may write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -# -# This CMake script finds the Bazaar version control system executable and -# and fetches the veresion string to valid that Bazaar was found and executes -# properly. -# -# Usage: -# find_package( Bazaar ) -# -# User definable. -# Bazaar_EXECUTABLE Set this to use a version of Bazaar that is not in -# current path. Defaults to bzr. -# -# Defines: -# Bazaar_FOUND Set to TRUE if Bazaar command line client is found -# and the bzr --version command executes properly. -# Bazaar_VERSION Result of the bzr --version command. -# - -set( Bazaar_FOUND FALSE ) - -find_program( Bazaar_EXECUTABLE bzr - DOC "Bazaar version control system command line client" ) -mark_as_advanced( Bazaar_EXECUTABLE ) - -if( Bazaar_EXECUTABLE ) - - # Bazaar commands should be executed with the C locale, otherwise - # the message (which are parsed) may be translated causing the regular - # expressions to fail. - set( _Bazaar_SAVED_LC_ALL "$ENV{LC_ALL}" ) - set( ENV{LC_ALL} C ) - - # Fetch the Bazaar executable version. - execute_process( COMMAND ${Bazaar_EXECUTABLE} --version - OUTPUT_VARIABLE _bzr_version_output - ERROR_VARIABLE _bzr_version_error - RESULT_VARIABLE _bzr_version_result - OUTPUT_STRIP_TRAILING_WHITESPACE ) - - if( ${_bzr_version_result} EQUAL 0 ) - set( Bazaar_FOUND TRUE ) - string( REGEX REPLACE "^[\n]*Bazaar \\(bzr\\) ([0-9.a-z]+).*" - "\\1" Bazaar_VERSION "${_bzr_version_output}" ) - message( STATUS "Bazaar version control system version ${Bazaar_VERSION} found." ) - endif() - - # restore the previous LC_ALL - set( ENV{LC_ALL} ${_Bazaar_SAVED_LC_ALL} ) -endif() - -if( NOT Bazaar_FOUND ) - if( NOT Bazaar_FIND_QUIETLY ) - message( STATUS "Bazaar version control command line client was not found." ) - else() - if( Bazaar_FIND_REQUIRED ) - message( FATAL_ERROR "Bazaar version control command line client was not found." ) - endif() - endif() -endif() diff --git a/CMakeModules/FindSubversion.cmake b/CMakeModules/FindSubversion.cmake deleted file mode 100644 index 31f20c29dd..0000000000 --- a/CMakeModules/FindSubversion.cmake +++ /dev/null @@ -1,140 +0,0 @@ -# -# From CMake 2.6.1 -# - -# -# - Extract information from a subversion working copy -# The module defines the following variables: -# Subversion_SVN_EXECUTABLE - path to svn command line client -# Subversion_VERSION_SVN - version of svn command line client -# Subversion_FOUND - true if the command line client was found -# If the command line client executable is found the macro -# Subversion_WC_INFO( ) -# is defined to extract information of a subversion working copy at -# a given location. The macro defines the following variables: -# _WC_URL - url of the repository (at ) -# _WC_ROOT - root url of the repository -# _WC_REVISION - current revision -# _WC_LAST_CHANGED_AUTHOR - author of last commit -# _WC_LAST_CHANGED_DATE - date of last commit -# _WC_LAST_CHANGED_REV - revision of last commit -# _WC_LAST_CHANGED_LOG - last log of base revision -# _WC_INFO - output of command `svn info ' -# Example usage: -# FIND_PACKAGE(Subversion) -# IF(Subversion_FOUND) -# Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) -# MESSAGE("Current revision is ${Project_WC_REVISION}") -# Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project) -# MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}") -# ENDIF(Subversion_FOUND) - -# Copyright (c) 2006, Tristan Carel -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the University of California, Berkeley nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY -# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# $Id: FindSubversion.cmake,v 1.2.2.3 2008-05-23 20:09:34 hoffman Exp $ - -SET(Subversion_FOUND FALSE) -SET(Subversion_SVN_FOUND FALSE) - -FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn - DOC "subversion command line client") -MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE) - -IF(Subversion_SVN_EXECUTABLE) - SET(Subversion_SVN_FOUND TRUE) - SET(Subversion_FOUND TRUE) - - MACRO(Subversion_WC_INFO dir prefix) - # the subversion commands should be executed with the C locale, otherwise - # the message (which are parsed) may be translated, Alex - SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}") - SET(ENV{LC_ALL} C) - - EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version - WORKING_DIRECTORY ${dir} - OUTPUT_VARIABLE Subversion_VERSION_SVN - OUTPUT_STRIP_TRAILING_WHITESPACE) - - EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} info ${dir} - OUTPUT_VARIABLE ${prefix}_WC_INFO - ERROR_VARIABLE Subversion_svn_info_error - RESULT_VARIABLE Subversion_svn_info_result - OUTPUT_STRIP_TRAILING_WHITESPACE) - - IF(NOT ${Subversion_svn_info_result} EQUAL 0) - MESSAGE(STATUS "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}") - ELSE(NOT ${Subversion_svn_info_result} EQUAL 0) - - STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*" - "\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}") - STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" - "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}") - STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" - "\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}") - STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*" - "\\2" ${prefix}_WC_LAST_CHANGED_AUTHOR "${${prefix}_WC_INFO}") - STRING(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*" - "\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}") - STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*" - "\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}") - - ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0) - - # restore the previous LC_ALL - SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL}) - - ENDMACRO(Subversion_WC_INFO) - - MACRO(Subversion_WC_LOG dir prefix) - # This macro can block if the certificate is not signed: - # svn ask you to accept the certificate and wait for your answer - # This macro requires a svn server network access (Internet most of the time) - # and can also be slow since it access the svn server - EXECUTE_PROCESS(COMMAND - ${Subversion_SVN_EXECUTABLE} log -r BASE ${dir} - OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG - ERROR_VARIABLE Subversion_svn_log_error - RESULT_VARIABLE Subversion_svn_log_result - OUTPUT_STRIP_TRAILING_WHITESPACE) - - IF(NOT ${Subversion_svn_log_result} EQUAL 0) - MESSAGE(STATUS "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}") - ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0) - ENDMACRO(Subversion_WC_LOG) - -ENDIF(Subversion_SVN_EXECUTABLE) - -IF(NOT Subversion_FOUND) - IF(NOT Subversion_FIND_QUIETLY) - MESSAGE(STATUS "Subversion was not found.") - ELSE(NOT Subversion_FIND_QUIETLY) - IF(Subversion_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Subversion was not found.") - ENDIF(Subversion_FIND_REQUIRED) - ENDIF(NOT Subversion_FIND_QUIETLY) -ENDIF(NOT Subversion_FOUND) - -# FindSubversion.cmake ends here.