Upgrade Cable to 0.2.16

This commit is contained in:
Paweł Bylica 2019-01-15 13:56:39 +01:00
commit e7caf901c6
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
6 changed files with 39 additions and 3 deletions

View File

@ -32,7 +32,7 @@ macro(cable_configure_compiler)
if(NOT PROJECT_IS_NESTED)
# Do this configuration only in the top project.
cmake_parse_arguments(cable "NO_CONVERSION_WARNINGS;NO_STACK_PROTECTION" "" "" ${ARGN})
cmake_parse_arguments(cable "NO_CONVERSION_WARNINGS;NO_STACK_PROTECTION;NO_PEDANTIC" "" "" ${ARGN})
if(cable_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "cable_configure_compiler: Unknown options: ${cable_UNPARSED_ARGUMENTS}")
@ -52,8 +52,12 @@ macro(cable_configure_compiler)
if(CABLE_COMPILER_GNULIKE)
if(NOT cable_NO_PEDANTIC)
add_compile_options(-pedantic)
endif()
# Enable basing warnings set and treat them as errors.
add_compile_options(-pedantic -Werror -Wall -Wextra)
add_compile_options(-Werror -Wall -Wextra)
if(NOT cable_NO_CONVERSION_WARNINGS)
# Enable conversion warnings if not explicitly disabled.

View File

@ -10,7 +10,7 @@
#
# This is internal variable automatically updated with external tools.
# Use CABLE_VERSION variable if you need this information.
set(version 0.2.14)
set(version 0.2.16)
# For convenience, add the project CMake module dir to module path.
set(module_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

View File

@ -0,0 +1,9 @@
# Cable: CMake Bootstrap Library.
# Copyright 2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

7
toolchains/cxx14.cmake Normal file
View File

@ -0,0 +1,7 @@
# Cable: CMake Bootstrap Library.
# Copyright 2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)

View File

@ -0,0 +1,9 @@
# Cable: CMake Bootstrap Library.
# Copyright 2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

7
toolchains/cxx17.cmake Normal file
View File

@ -0,0 +1,7 @@
# Cable: CMake Bootstrap Library.
# Copyright 2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)