Skip to content

Commit

Permalink
[CMake] Update required version of CMake to 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed Nov 25, 2017
1 parent b88ce8d commit a5d1ffb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install:
############################################################################
# Install a recent CMake
############################################################################
- set CMAKE_URL="https://cmake.org/files/v3.8/cmake-3.8.0-win64-x64.zip"
- set CMAKE_URL="https://cmake.org/files/v3.10/cmake-3.10.0-win64-x64.zip"
- appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip
- 7z x cmake.zip -oC:\projects\deps > nul
- move C:\projects\deps\cmake-* C:\projects\deps\cmake # Move to a version-agnostic directory
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ install:
############################################################################
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.8/cmake-3.8.0-Linux-x86_64.tar.gz"
CMAKE_URL="https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
Expand Down
15 changes: 5 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)

cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.9)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

##############################################################################
Expand Down Expand Up @@ -50,15 +50,10 @@ include(CheckCxxCompilerSupport)
include(CheckCXXCompilerFlag)
add_library(hana INTERFACE)
target_include_directories(hana INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
# With Clang on Windows, the -std=c++14 flag is incorrectly set and the compiler
# complains about the unknown option. TODO: Remove this workaround once the
# underlying bug is fixed in CMake: https://gitlab.kitware.com/cmake/cmake/issues/17015
if (NOT (MSVC AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang"))
if (BOOST_HANA_ENABLE_CPP17)
target_compile_features(hana INTERFACE cxx_std_17)
else()
target_compile_features(hana INTERFACE cxx_std_14)
endif()
if (BOOST_HANA_ENABLE_CPP17)
target_compile_features(hana INTERFACE cxx_std_17)
else()
target_compile_features(hana INTERFACE cxx_std_14)
endif()

# Export the `hana` library into a HanaConfig.cmake file
Expand Down

0 comments on commit a5d1ffb

Please sign in to comment.