Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/CMakeLists.txt
# Copyright (c) 2017 The Bitcoin developers | # Copyright (c) 2017 The Bitcoin developers | ||||
cmake_minimum_required(VERSION 3.5) | cmake_minimum_required(VERSION 3.5) | ||||
project(secp256k1) | project(secp256k1 LANGUAGES C) | ||||
# Add path for custom modules when building as a standalone project | # Add path for custom modules when building as a standalone project | ||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) | list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) | ||||
include(AddCompilerFlags) | include(AddCompilerFlags) | ||||
# libsecp256k1 use a different set of flags. | # libsecp256k1 use a different set of flags. | ||||
add_compiler_flags( | add_c_compiler_flags( | ||||
-pedantic | -pedantic | ||||
-Wall | -Wall | ||||
-Wextra | -Wextra | ||||
-Wcast-align | -Wcast-align | ||||
-Wshadow | -Wshadow | ||||
-Wno-unused-function | -Wno-unused-function | ||||
-Wno-overlength-strings | -Wno-overlength-strings | ||||
) | |||||
add_c_compiler_flags( | |||||
-std=c89 | -std=c89 | ||||
-Wnested-externs | -Wnested-externs | ||||
-Wstrict-prototypes | -Wstrict-prototypes | ||||
-Wno-long-long | -Wno-long-long | ||||
) | ) | ||||
# Default visibility is hidden on all targets. | # Default visibility is hidden on all targets. | ||||
set(CMAKE_C_VISIBILITY_PRESET hidden) | set(CMAKE_C_VISIBILITY_PRESET hidden) | ||||
▲ Show 20 Lines • Show All 209 Lines • Show Last 20 Lines |