Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
drdanz committed Jun 15, 2017
2 parents 00a6b57 + db31602 commit 0cd4e32
Show file tree
Hide file tree
Showing 29 changed files with 269 additions and 618 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.2.3.{build}
version: 0.3.0.{build}

init:
- cmd: git config --global core.autocrlf true
Expand Down
12 changes: 2 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# License text for the above reference.)


cmake_minimum_required(VERSION 2.8.9)
cmake_minimum_required(VERSION 3.0)
project(YCM NONE)


Expand All @@ -30,12 +30,6 @@ else()
set(CMAKE_SUPPORTS_STRING_APPEND 0)
endif()

if(NOT CMAKE_VERSION VERSION_LESS 3.0)
set(CMAKE_SUPPORTS_NEW_STYLE_COMMENTS 1)
else()
set(CMAKE_SUPPORTS_NEW_STYLE_COMMENTS 0)
endif()


list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/internal-modules")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
Expand All @@ -49,9 +43,7 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
endif()

if(YCM_MAINTAINER_MODE)
if(NOT CMAKE_SUPPORTS_CMAKE_PARSE_ARGUMENTS OR
NOT CMAKE_SUPPORTS_STRING_APPEND OR
NOT CMAKE_SUPPORTS_NEW_STYLE_COMMENTS)
if(NOT CMAKE_SUPPORTS_CMAKE_PARSE_ARGUMENTS OR NOT CMAKE_SUPPORTS_STRING_APPEND)
message(AUTHOR_WARNING "Maintainer mode enabled, but not all required features supported by CMake. YCM build might not be usable.")
endif()

Expand Down
4 changes: 1 addition & 3 deletions YCMConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ foreach(_version 3.7
3.4
3.3
3.2
3.1
3.0
2.8.12)
3.1)
if(EXISTS "${YCM_MODULE_DIR}/cmake-${_version}"
AND CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS ${_version}
AND CMAKE_VERSION VERSION_LESS ${_version})
Expand Down
152 changes: 28 additions & 124 deletions cmake-next/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,113 +91,30 @@ function(_YCM_CMAKE_NEXT_DOWNLOAD_NOW _ref _dir _files)
endfunction()


# Downloaded modules CMake Version Comment string(APPEND) Uncommitted
# Version Style Changes
# (req 3.0) (req 3.4)
# SelectLibraryConfigurations 2.8.12
# CMakeFindDependencyMacro 3.0
# FindFreetype 3.0
# FindLua 3.0
# FeatureSummary 3.1
# CMakePackageConfigHelpers 3.1
# FindPkgConfig 3.1 New
# ExternalProject 3.3 New Yes
# Downloaded modules CMake Version string(APPEND) CMakeParseArguments Uncommitted
# Version without include Changes
# (req 3.4)
# FeatureSummary 3.1 3.8
# CMakePackageConfigHelpers 3.1 3.8
# FindPkgConfig 3.1
# ExternalProject 3.3 Yes
# GNUInstallDirs 3.4
# FindGTK2 3.5
# FindGTK2 3.5 3.8
# FindMatlab 3.7
# UseSWIG master Yes
# CMakeParseArguments --- Yes
# FindGLEW --- Yes
# UseSWIG master Yes 3.8
# CMakeParseArguments --- Yes
# FindGLEW --- Yes
#
# Changes in dependencies
# FindPackageHandleStandardArgs 3.3 3.7

################################################################################
# Files not available or containing bugs in CMake 2.8.11.2
# Imported from CMake tag v2.8.12.2
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 2.8.12. You can remove this.")
endif()

# We assume that the user won't downgrade his cmake, therefore it's not
# necessary to download and install these files if already included in CMake
if(CMAKE_VERSION VERSION_LESS 2.8.12 OR YCM_MAINTAINER_MODE)
set(_files Copyright.txt cc156f64bf5196dfb35f7ae7a4081a434e128ef4
Modules/SelectLibraryConfigurations.cmake b0f24bea56e731e219506a1936c08817dc556d0a)
_ycm_cmake_next_download(v2.8.12.2 "${CMAKE_CURRENT_BINARY_DIR}/cmake-2.8.12" "${_files}")
_ycm_cmake_next_install(v2.8.12.2 DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cmake-2.8.12"
DESTINATION "${YCM_INSTALL_MODULE_DIR}")
endif()


################################################################################
# Files not available or containing bugs in CMake 2.8.12.2
# Imported from CMake tag v3.0.2
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.0)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.0. You can remove this.")
endif()

# We assume that the user won't downgrade his cmake, therefore it's not
# necessary to download and install these files if already included in CMake
if(CMAKE_VERSION VERSION_LESS 3.0 OR YCM_MAINTAINER_MODE)

set(_files Copyright.txt 84889816c71a04e30e715b89faf10d72a7334839
Modules/CMakeFindDependencyMacro.cmake deb8d8b27adeb39cffd9190916fd5f0e3eca4c24
Modules/FindFreetype.cmake b1a41d0d1321356beccc077495aa0d4c3d57e3a6
Modules/FindLua.cmake 477a45a0d2554af399492fa2213da72b73315ed1
Modules/FindPackageHandleStandardArgs.cmake 6f694a4c8de523b14ce1dbc44c3f5942fc467fc1 # Used by FindFreetype and FindLua
Modules/FindPackageMessage.cmake eceba493416b1ce30cecbbfad7d4835e80969195 # Used by FindPackageHandleStandardArgs
Modules/CMakeParseArguments.cmake 00c393ca7dfd7f9ea9d1a5dc99702dcaffd289af) # Used by FindPackageHandleStandardArgs
_ycm_cmake_next_download(v3.0.2 "${CMAKE_CURRENT_BINARY_DIR}/cmake-3.0" "${_files}")
_ycm_cmake_next_install(v3.0.2 DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cmake-3.0"
DESTINATION "${YCM_INSTALL_MODULE_DIR}")
endif()


################################################################################
# Files not available or containing bugs in CMake 3.0.2
# Imported from CMake tag v3.1.3
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.1)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.1. You can remove this.")
endif()

# We assume that the user won't downgrade his cmake, therefore it's not
# necessary to download and install these files if already included in CMake
if(CMAKE_VERSION VERSION_LESS 3.1 OR YCM_MAINTAINER_MODE)

set(_files Copyright.txt be2d273ed3c3559df71debc3f07fbe76a31dea28
Modules/FeatureSummary.cmake 3aeab8c56de0ea21a489cc3d90ee47f833c699bc
Modules/FindPackageHandleStandardArgs.cmake a8857b6817a645669f4fa5999081abf34fa25523 # Used by FindPkgConfig
Modules/FindPackageMessage.cmake dbc69daf94e8a4039286f4ae6a8702af418b253a # Used by FindPackageHandleStandardArgs
Modules/CMakeParseArguments.cmake 8adc20a6a6a0ca5a82338b6edc3cd6e24ba7b3f2) # Used by FeatureSummary and FindPackageHandleStandardArgs
set(_now_files
Modules/CMakePackageConfigHelpers.cmake 8d88059037b52bc607cc69ccb073adaef1206d99)

# FindPkgConfig uses the new comment style, so we ship an old-style commented
# version
if(CMAKE_SUPPORTS_NEW_STYLE_COMMENTS OR YCM_MAINTAINER_MODE)
list(APPEND _files Modules/FindPkgConfig.cmake 8fbef856c63483a208eddcd0e69ea29f59e48460)
else()
file(COPY v3.1.3/FindPkgConfig.cmake
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/cmake-3.1/Modules")
endif()

_ycm_cmake_next_download(v3.1.3 "${CMAKE_CURRENT_BINARY_DIR}/cmake-3.1" "${_files}")
_ycm_cmake_next_download_now(v3.1.3 "${CMAKE_CURRENT_BINARY_DIR}/cmake-3.1" "${_now_files}")
_ycm_cmake_next_install(v3.1.3 DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cmake-3.1"
DESTINATION "${YCM_INSTALL_MODULE_DIR}")
endif()
# FindPackageHandleStandardArgs 3.7


################################################################################
# Files not available or containing bugs in CMake 3.1.3
# Imported from CMake tag v3.2.3
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.2)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.1)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.2. You can remove this.")
message(AUTHOR_WARNING "CMake minimum required version greater than 3.1. You can remove this.")
endif()

# None
Expand All @@ -206,9 +123,9 @@ endif()
################################################################################
# Files not available or containing bugs in CMake 3.2.3
# Imported from CMake tag v3.3.2
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.3)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.2)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.3. You can remove this.")
message(AUTHOR_WARNING "CMake minimum required version greater than 3.2. You can remove this.")
endif()

# None
Expand All @@ -217,9 +134,9 @@ endif()
################################################################################
# Files not available or containing bugs in CMake 3.3.2
# Imported from CMake tag v3.4.3
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.4)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.3)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.4. You can remove this.")
message(AUTHOR_WARNING "CMake minimum required version greater than 3.3. You can remove this.")
endif()

# We assume that the user won't downgrade his cmake, therefore it's not
Expand All @@ -237,9 +154,9 @@ endif()
################################################################################
# Files not available or containing bugs in CMake 3.4.3
# Imported from CMake tag v3.5.2
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.5)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.4)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.5. You can remove this.")
message(AUTHOR_WARNING "CMake minimum required version greater than 3.4. You can remove this.")
endif()

# We assume that the user won't downgrade his cmake, therefore it's not
Expand All @@ -249,17 +166,9 @@ if(CMAKE_VERSION VERSION_LESS 3.5 OR YCM_MAINTAINER_MODE)
set(_files Copyright.txt 4a4e319a92c005163903c4ae537669d0026bae7d
Modules/FindGTK2.cmake 49af0a4282a353269ad0e938775c594d0e1319c7
Modules/SelectLibraryConfigurations.cmake 4d1ee73df6dadcb2e51f12059cf48f5e9165bb1e # Used by FindGTK2
Modules/FindPackageHandleStandardArgs.cmake 9a543ff079dc8e313f1dae812688f4be14e25134 # Used by FindGTK2
Modules/FindPackageMessage.cmake dbc69daf94e8a4039286f4ae6a8702af418b253a) # Used by FindPackageHandleStandardArgs

# Since CMake 3.3, FindPackageHandleStandardArgs uses the new comment style,
# so we ship an old-style commented version
if(CMAKE_SUPPORTS_NEW_STYLE_COMMENTS OR YCM_MAINTAINER_MODE)
list(APPEND _files Modules/FindPackageHandleStandardArgs.cmake 9a543ff079dc8e313f1dae812688f4be14e25134) # Used by FindGTK2
else()
file(COPY v3.5.2/FindPackageHandleStandardArgs.cmake
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/cmake-3.5/Modules")
endif()

# Since CMake 3.5, CMakeParseArguments.cmake was replaced by the
# cmake_parse_arguments command and the file is empty, therefore we import
# the older version for CMake 3.4 and earlier
Expand All @@ -280,9 +189,9 @@ endif()
################################################################################
# Files not available or containing bugs in CMake 3.5.2
# Imported from CMake tag v3.6.2
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.6)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.5)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.6. You can remove this.")
message(AUTHOR_WARNING "CMake minimum required version greater than 3.5. You can remove this.")
endif()

# None
Expand All @@ -291,9 +200,9 @@ endif()
################################################################################
# Files not available or containing bugs in CMake 3.6.3
# Imported from CMake tag v3.7.0
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.7)
if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.6)
# Just a reminder to remove this when we change cmake version
message(AUTHOR_WARNING "CMake minimum required version greater than 3.7. You can remove this.")
message(AUTHOR_WARNING "CMake minimum required version greater than 3.6. You can remove this.")
endif()

# We assume that the user won't downgrade his cmake, therefore it's not
Expand All @@ -309,12 +218,12 @@ endif()


################################################################################
# Files not yet available or containing bugs in current CMake release (v3.7.0)
# Files not yet available or containing bugs in current CMake release (v3.7.2)
# Imported from latest revision tested

set(_ref ab4a9a98266fb29008cecc9649a91fc844c541f5)

if(NOT CMAKE_VERSION VERSION_LESS 3.8)
if(NOT CMAKE_VERSION VERSION_LESS 3.7.2)
# Just a reminder to update files when a new cmake version is released
message(AUTHOR_WARNING "CMake version is ${CMAKE_VERSION}. You should update this.")
endif()
Expand All @@ -324,16 +233,11 @@ set(_files Copyright.txt 142359ab254d35db46c6d3d29
Modules/FindSWIG.cmake dea8c36114b8fcd934118a0fc86c0641cd191c18 # Required to use this version of UseSWIG
Modules/FindPackageMessage.cmake 68bfe02f96faabad103d59811b324d82d7c1d178) # Used by FindPackageHandleStandardArgs

# Since CMake 3.3, FindPackageHandleStandardArgs uses the new comment style,
# so we ship an old-style commented version
# Since CMake 3.7, FindPackageHandleStandardArgs uses string(APPEND)
if(CMAKE_SUPPORTS_STRING_APPEND OR YCM_MAINTAINER_MODE)
list(APPEND _files Modules/FindPackageHandleStandardArgs.cmake 1f71d36d60c70e83d6bd1f2ec09003ed445cec68) # Used by FindSWIG
elseif(CMAKE_SUPPORTS_STRING_APPEND)
file(COPY v3.7.0/FindPackageHandleStandardArgs.cmake
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/cmake-next/Modules")
else()
file(COPY v3.5.2/FindPackageHandleStandardArgs.cmake
file(COPY v3.7.0/FindPackageHandleStandardArgs.cmake
DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/cmake-next/Modules")
endif()

Expand Down
Loading

0 comments on commit 0cd4e32

Please sign in to comment.