Skip to content

Commit

Permalink
Upgrade Cable to 0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Aug 12, 2019
2 parents 66f2019 + 3849933 commit 961eeac
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 8 deletions.
1 change: 1 addition & 0 deletions cmake/cable/CableBuildInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function(cable_add_buildinfo_library)
${cable_buildinfo_template_dir}/buildinfo.cmake
${cable_buildinfo_template_dir}/buildinfo.c.in
${cable_buildinfo_template_dir}/buildinfo.json.in
${cable_buildinfo_template_dir}/version.h.in
${name}-git
${output_dir}/gitinfo.txt
)
Expand Down
2 changes: 1 addition & 1 deletion cmake/cable/CableCompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ macro(cable_configure_compiler)
if(CABLE_COMPILER_GNULIKE)

if(NOT cable_NO_PEDANTIC)
add_compile_options(-pedantic)
add_compile_options(-Wpedantic)
endif()

# Enable basing warnings set and treat them as errors.
Expand Down
28 changes: 28 additions & 0 deletions cmake/cable/CablePackage.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Cable: CMake Bootstrap Library.
# Copyright 2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.

if(cable_package_included)
return()
endif()
set(cable_package_included TRUE)

# Configures CPack to build the archive package.
macro(cable_add_archive_package)
if(WIN32)
set(CPACK_GENERATOR ZIP)
set(CPACK_SOURCE_GENERATOR ZIP)
else()
set(CPACK_GENERATOR TGZ)
set(CPACK_SOURCE_GENERATOR TGZ)
endif()
string(TOLOWER ${CMAKE_SYSTEM_NAME} system_name)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} system_processor)
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-${system_name}-${system_processor})
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-source)
set(CPACK_PACKAGE_CHECKSUM SHA256)
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY FALSE)
unset(system_name)
unset(system_processor)
include(CPack)
endmacro()
2 changes: 1 addition & 1 deletion cmake/cable/bootstrap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0)
set(version 0.4.3)

# For convenience, add the project CMake module dir to module path.
set(module_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
Expand Down
7 changes: 5 additions & 2 deletions cmake/cable/buildinfo/buildinfo.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Cable: CMake Bootstrap Library.
# Copyright 2018 Pawel Bylica.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
# Copyright 2018-2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.

string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPERCASE)
string(TOLOWER "${SYSTEM_NAME}" SYSTEM_NAME)
string(TOLOWER "${SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR)
string(TOLOWER "${COMPILER_ID}" COMPILER_ID)
Expand Down Expand Up @@ -82,3 +83,5 @@ configure_file(${CMAKE_CURRENT_LIST_DIR}/buildinfo.c.in ${OUTPUT_DIR}/buildinfo.
configure_file(${CMAKE_CURRENT_LIST_DIR}/buildinfo.json.in ${OUTPUT_DIR}/buildinfo.json)
configure_file(${CMAKE_CURRENT_LIST_DIR}/buildinfo.sh.in ${OUTPUT_DIR}/buildinfo.sh)
configure_file(${CMAKE_CURRENT_LIST_DIR}/buildinfo.ps1.in ${OUTPUT_DIR}/buildinfo.ps1)

configure_file(${CMAKE_CURRENT_LIST_DIR}/version.h.in ${OUTPUT_DIR}/version.h)
14 changes: 14 additions & 0 deletions cmake/cable/buildinfo/version.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* Cable: CMake Bootstrap Library.
* Copyright 2019 Pawel Bylica.
* Licensed under the Apache License, Version 2.0.
*/

/* Generated by Cable Build Info on @TIMESTAMP@. Do not modify directly. */

#pragma once

#define @PROJECT_NAME_UPPERCASE@_VERSION "@PROJECT_VERSION@"

#ifdef __cplusplus
constexpr auto @PROJECT_NAME@_version = "@PROJECT_VERSION@";
#endif
8 changes: 4 additions & 4 deletions cmake/cable/toolchains/cxx11-32bit.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Cable: CMake Bootstrap Library.
# Copyright 2018 Pawel Bylica.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
# Copyright 2018-2019 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF)

set(CMAKE_C_FLAGS -m32 CACHE STRING "C compiler flags" FORCE)
set(CMAKE_CXX_FLAGS -m32 CACHE STRING "C++ compiler flags" FORCE)
set(CMAKE_C_FLAGS_INIT -m32)
set(CMAKE_CXX_FLAGS_INIT -m32)
10 changes: 10 additions & 0 deletions cmake/cable/toolchains/cxx14-32bit.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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_C_FLAGS_INIT -m32)
set(CMAKE_CXX_FLAGS_INIT -m32)
10 changes: 10 additions & 0 deletions cmake/cable/toolchains/cxx17-32bit.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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_C_FLAGS_INIT -m32)
set(CMAKE_CXX_FLAGS_INIT -m32)

0 comments on commit 961eeac

Please sign in to comment.