Skip to content

Commit b18e434

Browse files
authored
Merge pull request #692 from pmienk/installer-rewrite
Rewritten build/install scripts.
2 parents a0f30f0 + 0c99017 commit b18e434

11 files changed

Lines changed: 3757 additions & 3615 deletions

File tree

.github/workflows/ci.yml

Lines changed: 208 additions & 598 deletions
Large diffs are not rendered by default.

build.cmd

Lines changed: 0 additions & 133 deletions
This file was deleted.

builds/cmake/CMakeLists.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ endif()
2222
#------------------------------------------------------------------------------
2323
# Project options.
2424
#------------------------------------------------------------------------------
25-
option( with-test "Build test." ON )
25+
option( with-tests "Build tests." ON )
2626
option( with-console "Build console." ON )
2727

2828
#------------------------------------------------------------------------------
@@ -187,15 +187,15 @@ set_target_properties( libbitcoin-server
187187
)
188188

189189
#------------------------------------------------------------------------------
190-
# libbitcoin-server-tests tests
190+
# libbitcoin-server-test tests
191191
#------------------------------------------------------------------------------
192-
if ( with-test )
193-
add_executable( libbitcoin-server-tests )
192+
if ( with-tests )
193+
add_executable( libbitcoin-server-test )
194194

195195
enable_testing()
196196

197-
add_test( NAME libbitcoin-server-tests
198-
COMMAND libbitcoin-server-tests
197+
add_test( NAME libbitcoin-server-test
198+
COMMAND libbitcoin-server-test
199199
--run_test=*
200200
--log_level=warning
201201
--show_progress=no
@@ -204,12 +204,12 @@ if ( with-test )
204204
--build_info=yes
205205
)
206206

207-
target_compile_features( libbitcoin-server-tests
207+
target_compile_features( libbitcoin-server-test
208208
PUBLIC
209209
cxx_std_20
210210
)
211211

212-
target_compile_options( libbitcoin-server-tests
212+
target_compile_options( libbitcoin-server-test
213213
PRIVATE
214214
-Wall
215215
-Wextra
@@ -225,23 +225,23 @@ if ( with-test )
225225
-fstack-protector-all
226226
)
227227

228-
file( GLOB_RECURSE libbitcoin_server_tests_SOURCES CONFIGURE_DEPENDS
228+
file( GLOB_RECURSE libbitcoin_server_test_SOURCES CONFIGURE_DEPENDS
229229
"${CMAKE_CURRENT_SOURCE_DIR}/../../test/*.c"
230230
"${CMAKE_CURRENT_SOURCE_DIR}/../../test/*.cpp"
231231
)
232232

233-
target_sources( libbitcoin-server-tests
233+
target_sources( libbitcoin-server-test
234234
PRIVATE
235-
${libbitcoin_server_tests_SOURCES}
235+
${libbitcoin_server_test_SOURCES}
236236
)
237237

238-
target_link_libraries( libbitcoin-server-tests
238+
target_link_libraries( libbitcoin-server-test
239239
PRIVATE
240240
Boost::unit_test_framework
241241
bitcoin::server
242242
)
243243

244-
set_target_properties( libbitcoin-server-tests
244+
set_target_properties( libbitcoin-server-test
245245
PROPERTIES
246246
VERSION ${PROJECT_VERSION}
247247
SOVERSION ${PROJECT_VERSION_MAJOR}

builds/cmake/CMakePresets.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@
1111
"type": "inList",
1212
"string": "${hostSystemName}",
1313
"list": [
14-
"Darwin",
15-
"Linux"
14+
"Darwin",
15+
"Linux"
1616
]
1717
},
1818
"cacheVariables": {
1919
"CMAKE_PREFIX_PATH": {
2020
"type": "PATH",
2121
"value": "${sourceParentDir}/../../../prefix/${presetName}"
2222
},
23+
"CMAKE_INSTALL_PREFIX_PATH": {
24+
"type": "PATH",
25+
"value": "${sourceParentDir}/../../../prefix/${presetName}"
26+
},
2327
"CMAKE_LIBRARY_PATH": {
2428
"type": "PATH",
2529
"value": "${sourceParentDir}/../../../prefix/${presetName}/lib:$env{CMAKE_LIBRARY_PATH}"
@@ -31,25 +35,19 @@
3135
"description": "Factored debug settings.",
3236
"hidden": true,
3337
"cacheVariables": {
38+
"CMAKE_BUILD_TYPE": "Debug",
3439
"CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -Og -g --coverage",
35-
"CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Og -g --coverage",
36-
"enable-ndebug": {
37-
"type": "BOOL",
38-
"value": "OFF"
39-
}
40+
"CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Og -g --coverage"
4041
}
4142
},
4243
{
4344
"name": "gnu-release",
4445
"description": "Factored release settings.",
4546
"hidden": true,
4647
"cacheVariables": {
48+
"CMAKE_BUILD_TYPE": "Release",
4749
"CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -O3",
48-
"CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -O3",
49-
"enable-ndebug": {
50-
"type": "BOOL",
51-
"value": "ON"
52-
}
50+
"CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -O3"
5351
}
5452
},
5553
{
@@ -124,9 +122,9 @@
124122
"name": "nix-target-list",
125123
"hidden": true,
126124
"targets": [
127-
"bitcoin-server",
125+
"libbitcoin-server",
128126
"libbitcoin-server-test",
129-
"bs"
127+
"bitcoin-server"
130128
]
131129
},
132130
{

0 commit comments

Comments
 (0)