Skip to content

Commit

Permalink
Build fixes for gcc 15 and newer cmake versions.
Browse files Browse the repository at this point in the history
* Update Cirrus and AppVeyor CI runners
  • Loading branch information
mtl1979 committed Sep 17, 2024
1 parent 85ddbab commit 35ff22f
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ for:
build_script:
- md build
- cd build
- cmake -DBOOST_ROOT=C:\Libraries\boost_1_77_0 -DBOOST_LIBRARYDIR=C:\Libraries\boost_1_77_0\lib64-msvc-14.2 -G "Visual Studio 16 2019" ..
- cmake -DBOOST_ROOT=C:\Libraries\boost_1_83_0 -DBOOST_LIBRARYDIR=C:\Libraries\boost_1_83_0\lib64-msvc-14.2 -G "Visual Studio 16 2019" ..
- cmake --build . --config Release

-
Expand All @@ -38,5 +38,5 @@ for:
build_script:
- md build
- cd build
- cmake -DBOOST_ROOT=C:\Libraries\boost_1_78_0 -DBOOST_LIBRARYDIR=C:\Libraries\boost_1_78_0\lib64-msvc-14.2 -G "Visual Studio 17 2022" ..
- cmake -DBOOST_ROOT=C:\Libraries\boost_1_83_0 -DBOOST_LIBRARYDIR=C:\Libraries\boost_1_83_0\lib64-msvc-14.2 -G "Visual Studio 17 2022" ..
- cmake --build . --config Release
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
task:
freebsd_instance:
matrix:
- image_family: freebsd-13-2
- image_family: freebsd-13-3
- image_family: freebsd-14-0

install_script: pkg install -y git cmake boost-all miniupnpc openssl
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install packages
run: |
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.7)

cmake_policy(SET CMP0048 NEW)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.30")
cmake_policy(SET CMP0167 OLD)
endif()

set(VERSION "0.1")
# $Format:Packaged from commit %H%nset(COMMIT %h)%nset(REFS "%d")$

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
Expand Down
1 change: 1 addition & 0 deletions external/rocksdb/include/rocksdb/compaction_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define STORAGE_ROCKSDB_INCLUDE_COMPACTION_FILTER_H_

#include <cassert>
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions external/rocksdb/include/rocksdb/filter_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <memory>
#include <stdexcept>
#include <stdint.h>
#include <stdlib.h>
#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion external/rocksdb/port/port_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void *cacheline_aligned_alloc(size_t size) {
return malloc(size);
#elif defined(_ISOC11_SOURCE)
return aligned_alloc(CACHE_LINE_SIZE, size);
#elif ( _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__APPLE__))
#elif ( (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || defined(__APPLE__))
void *m;
errno = posix_memalign(&m, CACHE_LINE_SIZE, size);
return errno ? NULL : m;
Expand Down
2 changes: 2 additions & 0 deletions src/CryptoNoteCore/IBlockchainCacheFactory.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2024, The Talleo developers
//
// This file is part of Bytecoin.
//
Expand All @@ -17,6 +18,7 @@

#pragma once

#include <cstdint>
#include <memory>

namespace CryptoNote {
Expand Down

0 comments on commit 35ff22f

Please sign in to comment.