Skip to content

Commit

Permalink
feat: build system improvements (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpelliccioni authored Oct 18, 2024
1 parent 2d1c65f commit 7a06639
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.20)

project(consensus VERSION 0 LANGUAGES CXX C)

Expand Down Expand Up @@ -217,7 +217,7 @@ endif()
# add_library(${PROJECT_NAME}-clone OBJECT)
add_library(${PROJECT_NAME}-clone ${MODE} ${kth_sources_clone})
add_library(${PROJECT_NAME}-clone::${PROJECT_NAME}-clone ALIAS ${PROJECT_NAME}-clone)
set_target_properties(${PROJECT_NAME}-clone PROPERTIES LINKER_LANGUAGE CXX CXX_STANDARD 20 CXX_STANDARD_REQUIRED TRUE)
set_target_properties(${PROJECT_NAME}-clone PROPERTIES LINKER_LANGUAGE CXX CXX_STANDARD 23 CXX_STANDARD_REQUIRED TRUE)

if (ENABLE_POSITION_INDEPENDENT_CODE)
set_property(TARGET ${PROJECT_NAME}-clone PROPERTY POSITION_INDEPENDENT_CODE ON)
Expand Down Expand Up @@ -261,7 +261,7 @@ set(kth_headers

add_library(${PROJECT_NAME} ${MODE} ${kth_sources} ${kth_headers} $<TARGET_OBJECTS:${PROJECT_NAME}-clone>)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX CXX_STANDARD 20 CXX_STANDARD_REQUIRED TRUE)
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX CXX_STANDARD 23 CXX_STANDARD_REQUIRED TRUE)

if (ENABLE_POSITION_INDEPENDENT_CODE)
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
Expand Down
1 change: 1 addition & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class KnuthConsensusConan(KnuthConanFileV2):
url = "https://github.com/k-nuth/consensus"
description = "Bitcoin Consensus Library"
settings = "os", "compiler", "build_type", "arch"
package_type = "library"

options = {"shared": [True, False],
"fPIC": [True, False],
Expand Down

0 comments on commit 7a06639

Please sign in to comment.