mirror of https://github.com/status-im/evmc.git
commit
fec4e4c6a4
|
@ -21,6 +21,7 @@ option(HUNTER_ENABLED "Enable Hunter package manager support" ${hunter_and_examp
|
||||||
include(cmake/cable/bootstrap.cmake)
|
include(cmake/cable/bootstrap.cmake)
|
||||||
include(CableBuildType)
|
include(CableBuildType)
|
||||||
include(CableCompilerSettings)
|
include(CableCompilerSettings)
|
||||||
|
include(CablePackage)
|
||||||
include(CableToolchains)
|
include(CableToolchains)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
@ -86,19 +87,6 @@ if(EVMC_INSTALL)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
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)
|
|
||||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-${system_name})
|
|
||||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME ${PROJECT_NAME}-${PROJECT_VERSION}-source)
|
|
||||||
set(CPACK_PACKAGE_CHECKSUM SHA256)
|
|
||||||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY FALSE)
|
|
||||||
|
|
||||||
set(
|
set(
|
||||||
CPACK_SOURCE_IGNORE_FILES
|
CPACK_SOURCE_IGNORE_FILES
|
||||||
/\\\\.git/
|
/\\\\.git/
|
||||||
|
@ -110,5 +98,4 @@ set(
|
||||||
/Cargo.toml
|
/Cargo.toml
|
||||||
/target/
|
/target/
|
||||||
)
|
)
|
||||||
|
cable_add_archive_package()
|
||||||
include(CPack)
|
|
||||||
|
|
|
@ -69,6 +69,7 @@ function(cable_add_buildinfo_library)
|
||||||
${cable_buildinfo_template_dir}/buildinfo.cmake
|
${cable_buildinfo_template_dir}/buildinfo.cmake
|
||||||
${cable_buildinfo_template_dir}/buildinfo.c.in
|
${cable_buildinfo_template_dir}/buildinfo.c.in
|
||||||
${cable_buildinfo_template_dir}/buildinfo.json.in
|
${cable_buildinfo_template_dir}/buildinfo.json.in
|
||||||
|
${cable_buildinfo_template_dir}/version.h.in
|
||||||
${name}-git
|
${name}-git
|
||||||
${output_dir}/gitinfo.txt
|
${output_dir}/gitinfo.txt
|
||||||
)
|
)
|
||||||
|
|
|
@ -53,7 +53,7 @@ macro(cable_configure_compiler)
|
||||||
if(CABLE_COMPILER_GNULIKE)
|
if(CABLE_COMPILER_GNULIKE)
|
||||||
|
|
||||||
if(NOT cable_NO_PEDANTIC)
|
if(NOT cable_NO_PEDANTIC)
|
||||||
add_compile_options(-pedantic)
|
add_compile_options(-Wpedantic)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Enable basing warnings set and treat them as errors.
|
# Enable basing warnings set and treat them as errors.
|
||||||
|
|
|
@ -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()
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# This is internal variable automatically updated with external tools.
|
# This is internal variable automatically updated with external tools.
|
||||||
# Use CABLE_VERSION variable if you need this information.
|
# 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.
|
# For convenience, add the project CMake module dir to module path.
|
||||||
set(module_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
set(module_dir ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# Cable: CMake Bootstrap Library.
|
# Cable: CMake Bootstrap Library.
|
||||||
# Copyright 2018 Pawel Bylica.
|
# Copyright 2018-2019 Pawel Bylica.
|
||||||
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
|
# Licensed under the Apache License, Version 2.0.
|
||||||
|
|
||||||
|
string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPERCASE)
|
||||||
string(TOLOWER "${SYSTEM_NAME}" SYSTEM_NAME)
|
string(TOLOWER "${SYSTEM_NAME}" SYSTEM_NAME)
|
||||||
string(TOLOWER "${SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR)
|
string(TOLOWER "${SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR)
|
||||||
string(TOLOWER "${COMPILER_ID}" COMPILER_ID)
|
string(TOLOWER "${COMPILER_ID}" COMPILER_ID)
|
||||||
|
@ -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.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.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}/buildinfo.ps1.in ${OUTPUT_DIR}/buildinfo.ps1)
|
||||||
|
|
||||||
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/version.h.in ${OUTPUT_DIR}/version.h)
|
||||||
|
|
|
@ -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
|
|
@ -1,10 +1,10 @@
|
||||||
# Cable: CMake Bootstrap Library.
|
# Cable: CMake Bootstrap Library.
|
||||||
# Copyright 2018 Pawel Bylica.
|
# Copyright 2018-2019 Pawel Bylica.
|
||||||
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
|
# Licensed under the Apache License, Version 2.0.
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS -m32 CACHE STRING "C compiler flags" FORCE)
|
set(CMAKE_C_FLAGS_INIT -m32)
|
||||||
set(CMAKE_CXX_FLAGS -m32 CACHE STRING "C++ compiler flags" FORCE)
|
set(CMAKE_CXX_FLAGS_INIT -m32)
|
||||||
|
|
|
@ -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)
|
|
@ -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)
|
Loading…
Reference in New Issue