dash/CMakeLists.txt

123 lines
3.6 KiB
CMake
Raw Normal View History

# This CMakeLists.txt is not meant to actually work!
# It only serves as a dummy project to make CLion work properly when it comes to symbol resolution and all the nice
# features dependent on that. Building must still be done on the command line using the automake build chain
# If you load this project in CLion and would like to run/debug executables, make sure to remove the "Build" entry from
# the run/debug configuration as otherwise CLion will try to build this project with cmake, failing horribly.
# You'll also have to manually change the executable in the configuration to the correct path of the already built executable
cmake_minimum_required(VERSION 3.7)
project(dash)
set(CMAKE_CXX_STANDARD 17)
include_directories(
src
src/qt/forms
src/leveldb/include
src/univalue/include
)
if(UNIX AND NOT APPLE)
set(DEPENDS_PREFIX depends/x86_64-pc-linux-gnu)
elseif(APPLE)
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
EXECUTE_PROCESS( COMMAND system_profiler -detailLevel mini -json SPSoftwareDataType
COMMAND jq .SPSoftwareDataType
COMMAND jq .[]
COMMAND jq .kernel_version
COMMAND tr -d "Dawrin\" "
OUTPUT_VARIABLE DARWIN_KERNEL_VERSION)
if( ${ARCHITECTURE} STREQUAL "arm64" )
set(DEPENDS_PREFIX depends/aarch64-apple-darwin${DARWIN_KERNEL_VERSION})
else()
set(DEPENDS_PREFIX depends/x86_64-apple-darwin${DARWIN_KERNEL_VERSION})
endif()
elseif(WIN32)
set(DEPENDS_PREFIX depends/x86_64-w64-mingw32)
endif()
message(STATUS "DEPENDS_PREFIX: ${DEPENDS_PREFIX}")
if(DEFINED DEPENDS_PREFIX)
include_directories(${DEPENDS_PREFIX}/include)
include_directories(${DEPENDS_PREFIX}/include/QtWidgets)
endif()
add_definitions(
Enable stacktrace support in gitian builds (#3006) * Remove use of -rdynamic This causes check-symbols to fail horribly and also turned out to be not required when using libbacktrace. It was only required when using "backtrace()" from "<execinfo.h>" * Remove spurious ], from configure.ac * Add -DENABLE_STACKTRACES=1 to CMakeLists.txt * Remove unused method my_backtrace_simple_callback * Use fs::path().filename() instead of basename() * Add static g_exeFileName and g_exeFileBaseName * Use .exe.dbg file when available * Use uint64_t instead of uintptr_t * Implement GetBaseAddress() for unix and win32 * Implement unified crash_info and use it everywhere before printing crash info * Print a serialized version of crash_info when there is no debug info * Implement "-printcrashinfo" command line option * Compile stacktrace support unconditionally and only make crash hooks conditional This also renames the --enable-stacktraces option to --enable-crash-hooks * Enable crash hooks in win/linux Gitian builds * Try to load .debug file on MacOS and enable crash hooks for osx Gitian builds * Check for dsymutil and if it needs --flat * Create .debug files in osx Gitian build * Handle review comments * Also print crash description when no stacktrace is available * Unconditionally add -g1 debug information Instead of making it dependent on "--enable-crash-hooks". We will need the debug info every time now, even in release builds. * Put MacOS debug info into dSYM symbols instead of plain .debug files * Implement MacOS specific GetBaseAddress
2019-07-02 06:16:11 +02:00
-DENABLE_CRASH_HOOKS=1
-DENABLE_STACKTRACES=1
-DENABLE_WALLET=1
)
# find src/ -name '*.h' -or -name '*.cpp' | sed -r 's/[^/]*.(h|cpp)$/*.\1/' | sort | uniq | grep -Ev "/(bench/data|obj)/" > list.txt
file(GLOB SOURCE_FILES
src/*.cpp
src/*.h
src/bench/*.cpp
src/bench/*.h
src/bls/*.cpp
src/bls/*.h
src/coinjoin/*.cpp
src/coinjoin/*.h
src/compat/*.cpp
src/compat/*.h
src/consensus/*.cpp
src/consensus/*.h
src/crypto/*.c
src/crypto/*.cpp
src/crypto/*.h
src/evo/*.cpp
src/evo/*.h
chore: Added governance sources files in CMake (#5105) <!-- *** Please remove the following help text before submitting: *** Provide a general summary of your changes in the Title above Pull requests without a rationale and clear improvement may be closed immediately. Please provide clear motivation for your patch and explain how it improves Dash Core user experience or Dash Core developer experience significantly: * Any test improvements or new tests that improve coverage are always welcome. * All other changes should have accompanying unit tests (see `src/test/`) or functional tests (see `test/`). Contributors should note which tests cover modified code. If no tests exist for a region of modified code, new tests should accompany the change. * Bug fixes are most welcome when they come with steps to reproduce or an explanation of the potential issue as well as reasoning for the way the bug was fixed. * Features are welcome, but might be rejected due to design or scope issues. If a feature is based on a lot of dependencies, contributors should first consider building the system outside of Dash Core, if possible. --> ## Issue being fixed or feature implemented <!--- Why is this change required? What problem does it solve? --> <!--- If it fixes an open issue, please link to the issue here. --> Added governance sources files in CMake so they can be indexed by IDE. ## What was done? <!--- Describe your changes in detail --> ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Breaking Changes <!--- Please describe any breaking changes your code introduces --> ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation **For repository code-owners and collaborators only** - [ ] I have assigned this pull request to a milestone
2022-12-13 18:54:59 +01:00
src/governance/*.cpp
src/governance/*.h
src/index/*.cpp
src/index/*.h
src/interfaces/*.cpp
src/interfaces/*.h
src/leveldb/db/*.cc
src/leveldb/db/*.h
src/leveldb/include/*.h
src/llmq/*.cpp
src/llmq/*.h
src/logging/*.h
src/masternode/*.cpp
src/masternode/*.h
src/node/*.cpp
src/node/*.h
src/policy/*.cpp
src/policy/*.h
src/primitives/*.cpp
src/primitives/*.h
src/qt/*.cpp
src/qt/*.h
src/qt/test/*.cpp
src/qt/test/*.h
src/rpc/*.cpp
src/rpc/*.h
src/script/*.cpp
src/script/*.h
src/secp256k1/include/*.h
src/support/allocators/*.h
src/support/*.cpp
src/support/*.h
src/test/*.cpp
src/test/*.h
src/test/fuzz/*.cpp
src/test/fuzz/*.h
src/test/util/*.cpp
src/test/util/*.h
src/univalue/include/*.h
src/univalue/lib/*.cpp
src/univalue/lib/*.h
src/util/*.h
src/util/*.cpp
src/wallet/*.cpp
src/wallet/*.h
src/wallet/test/*.cpp
src/zmq/*.cpp
src/zmq/*.h
)
add_executable(dash ${SOURCE_FILES})