As per title
Details
Details
- Reviewers
schancel - Group Reviewers
Restricted Project - Commits
- rSTAGINGdea7ebe308e9: Add cmake build for the crypto library
rABCdea7ebe308e9: Add cmake build for the crypto library
mkdir build && cd build cmake -GNinja .. ninja
Check that the library builds. Also repeat for windows builds.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Complaining about a few uses of constexpr:
ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DHAVE_CONFIG_H -I../src/crypto/.. -Isrc/crypto/.. -Isrc/crypto/../config -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -MD -MT src/crypto/CMakeFiles/crypto.dir/chacha20.cpp.o -MF src/crypto/CMakeFiles/crypto.dir/chacha20.cpp.o.d -o src/crypto/CMakeFiles/crypto.dir/chacha20.cpp.o -c ../src/crypto/chacha20.cpp ../src/crypto/chacha20.cpp:13:1: error: unknown type name 'constexpr'
Investigating
Comment Actions
The following fixes the build: (from https://cmake.org/Wiki/CMake/Tutorials/C%2B%2B11Flags)
Not sure if there is some better place to add this though that would be global.
diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt index 00b42ec40..baa72f954 100644 --- a/src/crypto/CMakeLists.txt +++ b/src/crypto/CMakeLists.txt @@ -1,5 +1,11 @@ # Copyright (c) 2017 The Bitcoin developers +cmake_minimum_required(VERSION 2.6) + +if(UNIX) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +endif() + include_directories( .. # To access the config.