diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-01-08 19:12:43 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-01-09 04:21:50 +0000 |
commit | aac30ba2d16ce496d0ecc37124febd0a8d6ae7b6 (patch) | |
tree | 55e4d5b72c6a732dd431a72b54cb3751e2354087 /cmake | |
parent | 796007e0e038e126ad775937084fee7468daac67 (diff) |
CMake,WSDG: Remove Cygwin support
Declare Cygwin as unsupported and remove all supporting code. Simplify
some Chocolatey notes in the WSDG.
Remove FindPerl.cmake as it only existed to force use of Wireshark's
bundled FindCygwin.cmake (bug 13922). FindXSLTPROC.cmake special
handling for Cygwin was also removed, in theory this could cause issues
when the PATH contains a Cygwin xsltproc, but it's unsupported anyway.
Change-Id: Iabfac2b4a9fd930530505d27bdba618bdb8f7f34
Reviewed-on: https://code.wireshark.org/review/31452
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindChocolatey.cmake | 30 | ||||
-rw-r--r-- | cmake/modules/FindCygwin.cmake | 43 | ||||
-rw-r--r-- | cmake/modules/FindLEX.cmake | 6 | ||||
-rw-r--r-- | cmake/modules/FindPOD.cmake | 7 | ||||
-rw-r--r-- | cmake/modules/FindPerl.cmake | 81 | ||||
-rw-r--r-- | cmake/modules/FindXSLTPROC.cmake | 30 | ||||
-rw-r--r-- | cmake/modules/FindYACC.cmake | 2 |
7 files changed, 11 insertions, 188 deletions
diff --git a/cmake/modules/FindChocolatey.cmake b/cmake/modules/FindChocolatey.cmake index 172335f9b9..81510e1628 100644 --- a/cmake/modules/FindChocolatey.cmake +++ b/cmake/modules/FindChocolatey.cmake @@ -3,40 +3,20 @@ # # This module looks for Chocolatey -# This code was copied from -# http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindCygwin.cmake;hb=HEAD -# and modified. -# -# Its toplevel COPYING file starts with: -#============================================================================= -# Copyright 2001-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -if (WIN32) - if (ENV{ChocolateyInstall}) +if(WIN32) + if(ENV{ChocolateyInstall}) set(_chocolateyinstall_bin "$ENV{ChocolateyInstall}/bin") endif() find_path(CHOCOLATEY_BIN_PATH choco.exe PATHS - $_chocolateyinstall_bin + ${_chocolateyinstall_bin} "$ENV{ProgramData}/chocolatey/bin" C:/Chocolatey/bin DOC "Chocolatey binary path" NO_DEFAULT_PATH ) - mark_as_advanced( - CHOCOLATEY_BIN_PATH - ) -endif () + mark_as_advanced(CHOCOLATEY_BIN_PATH) +endif() diff --git a/cmake/modules/FindCygwin.cmake b/cmake/modules/FindCygwin.cmake deleted file mode 100644 index 415bfb6a8f..0000000000 --- a/cmake/modules/FindCygwin.cmake +++ /dev/null @@ -1,43 +0,0 @@ -#.rst: -# FindCygwin -# ---------- -# -# this module looks for Cygwin - -# This code was copied from -# http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindCygwin.cmake;hb=HEAD -# and modified so as to check C:\Cygwin64 and the WIRESHARK_CYGWIN_INSTALL_PATH -# environment variable - -#============================================================================= -#CMake - Cross Platform Makefile Generator -#Copyright 2000-2015 Kitware, Inc. -#Copyright 2000-2011 Insight Software Consortium -#All rights reserved. -# -# SPDX-License-Identifier: BSD-3-Clause -#============================================================================= - -if (WIN32) - find_path(CYGWIN_INSTALL_PATH - NAMES cygwin.bat - PATHS - ENV WIRESHARK_CYGWIN_INSTALL_PATH - "C:/Cygwin" - "C:/Cygwin64" - "C:/tools/cygwin" - "C:/tools/cygwin64" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygwin\\setup;rootdir]" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]" - ) - - if(NOT CYGWIN_INSTALL_PATH) - if(WIRESHARK_CYGWIN_INSTALL_PATH) - message(FATAL_ERROR "WIRESHARK_CYGWIN_INSTALL_PATH was specified, but Cygwin was not found.") - endif() - endif() - - mark_as_advanced( - CYGWIN_INSTALL_PATH - ) -endif () diff --git a/cmake/modules/FindLEX.cmake b/cmake/modules/FindLEX.cmake index f7d010b732..0008bc43dd 100644 --- a/cmake/modules/FindLEX.cmake +++ b/cmake/modules/FindLEX.cmake @@ -2,17 +2,15 @@ # - Find flex/lex executable # -INCLUDE(FindCygwin) -INCLUDE(FindChocolatey) +include(FindChocolatey) -FIND_PROGRAM(LEX_EXECUTABLE +find_program(LEX_EXECUTABLE NAMES win_flex flex lex PATHS ${CHOCOLATEY_BIN_PATH} - ${CYGWIN_INSTALL_PATH}/bin /bin /usr/bin /usr/local/bin diff --git a/cmake/modules/FindPOD.cmake b/cmake/modules/FindPOD.cmake index 3326f2770f..15ce12e748 100644 --- a/cmake/modules/FindPOD.cmake +++ b/cmake/modules/FindPOD.cmake @@ -1,16 +1,12 @@ # -# - Find unix commands from cygwin -# This module looks for some usual Unix commands. +# - Find pod2man and pod2html. # -include(FindCygwin) - find_program(POD2MAN_EXECUTABLE NAMES pod2man pod2man.bat PATHS - ${CYGWIN_INSTALL_PATH}/bin /bin /usr/bin /usr/local/bin @@ -22,7 +18,6 @@ find_program(POD2HTML_EXECUTABLE pod2html pod2html.bat PATHS - ${CYGWIN_INSTALL_PATH}/bin /bin /usr/bin /usr/local/bin diff --git a/cmake/modules/FindPerl.cmake b/cmake/modules/FindPerl.cmake deleted file mode 100644 index 479b7197b5..0000000000 --- a/cmake/modules/FindPerl.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. -# This code was copied from -# http://cmake.org/gitweb?p=cmake.git;a=blob_plain;f=Modules/FindPerl.cmake;hb=HEAD -# and modified so as to be compatible with our packaged FindCygwin.cmake - -#.rst: -# FindPerl -# -------- -# -# Find perl -# -# this module looks for Perl -# -# :: -# -# PERL_EXECUTABLE - the full path to perl -# PERL_FOUND - If false, don't attempt to use perl. -# PERL_VERSION_STRING - version of perl found (since CMake 2.8.8) - -include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake) - -set(PERL_POSSIBLE_BIN_PATHS - ${CYGWIN_INSTALL_PATH}/bin - ) - -if(WIN32) - get_filename_component( - ActivePerl_CurrentVersion - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]" - NAME) - set(PERL_POSSIBLE_BIN_PATHS ${PERL_POSSIBLE_BIN_PATHS} - "C:/Perl/bin" - [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\${ActivePerl_CurrentVersion}]/bin - ) -endif() - -find_program(PERL_EXECUTABLE - NAMES perl - PATHS ${PERL_POSSIBLE_BIN_PATHS} - ) - -if(PERL_EXECUTABLE) - ### PERL_VERSION - execute_process( - COMMAND - ${PERL_EXECUTABLE} -V:version - OUTPUT_VARIABLE - PERL_VERSION_OUTPUT_VARIABLE - RESULT_VARIABLE - PERL_VERSION_RESULT_VARIABLE - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(NOT PERL_VERSION_RESULT_VARIABLE AND NOT PERL_VERSION_OUTPUT_VARIABLE MATCHES "^version='UNKNOWN'") - string(REGEX REPLACE "version='([^']+)'.*" "\\1" PERL_VERSION_STRING ${PERL_VERSION_OUTPUT_VARIABLE}) - else() - execute_process( - COMMAND ${PERL_EXECUTABLE} -v - OUTPUT_VARIABLE PERL_VERSION_OUTPUT_VARIABLE - RESULT_VARIABLE PERL_VERSION_RESULT_VARIABLE - ERROR_QUIET - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - if(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl.*[ \\(]v([0-9\\._]+)[ \\)]") - set(PERL_VERSION_STRING "${CMAKE_MATCH_1}") - elseif(NOT PERL_VERSION_RESULT_VARIABLE AND PERL_VERSION_OUTPUT_VARIABLE MATCHES "This is perl, version ([0-9\\._]+) +") - set(PERL_VERSION_STRING "${CMAKE_MATCH_1}") - endif() - endif() -endif() - -# Deprecated settings for compatibility with CMake1.4 -set(PERL ${PERL_EXECUTABLE}) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl - REQUIRED_VARS PERL_EXECUTABLE - VERSION_VAR PERL_VERSION_STRING) - -mark_as_advanced(PERL_EXECUTABLE) diff --git a/cmake/modules/FindXSLTPROC.cmake b/cmake/modules/FindXSLTPROC.cmake index f1958441a1..f7246b323c 100644 --- a/cmake/modules/FindXSLTPROC.cmake +++ b/cmake/modules/FindXSLTPROC.cmake @@ -1,20 +1,18 @@ # -# - Find unix commands from cygwin +# - Find XSLTPROC # This module looks for some usual Unix commands. # include(FindChocolatey) -include(FindCygwin) # Strawberry Perl ships with xsltproc but no DocBook XML files, which -# is detrimental to our interests. Search for the Chocolatey and Cygwin +# is detrimental to our interests. Search for the Chocolatey # versions first, and un-find xsltproc if needed. find_program(XSLTPROC_EXECUTABLE NAMES xsltproc HINTS ${CHOCOLATEY_BIN_PATH} - ${CYGWIN_INSTALL_PATH}/bin PATHS /usr/local/bin /sbin @@ -43,29 +41,7 @@ set (_common_xsltproc_args --stringparam html.stylesheet ws.css ) -if (WIN32 AND NOT "${CYGWIN_INSTALL_PATH}" STREQUAL "" AND ${XSLTPROC_EXECUTABLE} MATCHES "${CYGWIN_INSTALL_PATH}") - FIND_PROGRAM(CYGPATH_EXECUTABLE - NAMES cygpath - PATHS ${CYGWIN_INSTALL_PATH}/bin - ) - MACRO( TO_XSLTPROC_COMPATIBLE_PATH _cmake_path _result ) - execute_process( - COMMAND ${CYGPATH_EXECUTABLE} -u ${_cmake_path} - OUTPUT_VARIABLE _cygwin_path - ) - # cygpath adds a linefeed. - string(STRIP "${_cygwin_path}" _cygwin_path) - - set( ${_result} ${_cygwin_path} ) - ENDMACRO() - - TO_XSLTPROC_COMPATIBLE_PATH( ${CMAKE_CURRENT_SOURCE_DIR} _xsltproc_current_source_dir ) - TO_XSLTPROC_COMPATIBLE_PATH( ${CMAKE_CURRENT_BINARY_DIR} _xsltproc_current_binary_dir ) - - set ( _xsltproc_path "${_xsltproc_current_source_dir}:${_xsltproc_current_binary_dir}:${_xsltproc_current_binary_dir}/wsluarm_src") -else() - set ( _xsltproc_path "${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/wsluarm_src") -endif() +set(_xsltproc_path "${CMAKE_CURRENT_SOURCE_DIR}:${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/wsluarm_src") # Workaround for parallel build issue with msbuild. # https://gitlab.kitware.com/cmake/cmake/issues/16767 diff --git a/cmake/modules/FindYACC.cmake b/cmake/modules/FindYACC.cmake index 9360d71a1a..c96f87b389 100644 --- a/cmake/modules/FindYACC.cmake +++ b/cmake/modules/FindYACC.cmake @@ -2,7 +2,6 @@ # - Find bison/yacc executable # -INCLUDE(FindCygwin) INCLUDE(FindChocolatey) FIND_PROGRAM(YACC_EXECUTABLE @@ -12,7 +11,6 @@ FIND_PROGRAM(YACC_EXECUTABLE yacc PATHS ${CHOCOLATEY_BIN_PATH} - ${CYGWIN_INSTALL_PATH}/bin /bin /usr/bin /usr/local/bin |