diff options
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/32-bit-toolchain.cmake | 2 | ||||
-rw-r--r-- | cmake/64-bit-toolchain.cmake | 2 | ||||
-rw-r--r-- | cmake/CheckTrezor.cmake | 17 | ||||
-rw-r--r-- | cmake/FindUnbound.cmake | 2 | ||||
-rw-r--r-- | cmake/GenVersion.cmake | 2 | ||||
-rw-r--r-- | cmake/Version.cmake | 2 | ||||
-rw-r--r-- | cmake/test-libusb-version.c | 2 | ||||
-rw-r--r-- | cmake/test-protobuf.cpp | 2 | ||||
-rw-r--r-- | cmake/test-static-assert.c | 2 | ||||
-rw-r--r-- | cmake/test-static-assert.cpp | 2 |
10 files changed, 25 insertions, 10 deletions
diff --git a/cmake/32-bit-toolchain.cmake b/cmake/32-bit-toolchain.cmake index 253523e66..2d53adf06 100644 --- a/cmake/32-bit-toolchain.cmake +++ b/cmake/32-bit-toolchain.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2018, The Monero Project +# Copyright (c) 2014-2019, The Monero Project # # All rights reserved. # diff --git a/cmake/64-bit-toolchain.cmake b/cmake/64-bit-toolchain.cmake index b4b528347..7c56eef95 100644 --- a/cmake/64-bit-toolchain.cmake +++ b/cmake/64-bit-toolchain.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2018, The Monero Project +# Copyright (c) 2014-2019, The Monero Project # # All rights reserved. # diff --git a/cmake/CheckTrezor.cmake b/cmake/CheckTrezor.cmake index 71214363d..6aabdda36 100644 --- a/cmake/CheckTrezor.cmake +++ b/cmake/CheckTrezor.cmake @@ -1,6 +1,8 @@ OPTION(USE_DEVICE_TREZOR "Trezor support compilation" ON) OPTION(USE_DEVICE_TREZOR_LIBUSB "Trezor LibUSB compilation" ON) OPTION(USE_DEVICE_TREZOR_UDP_RELEASE "Trezor UdpTransport in release mode" OFF) +OPTION(USE_DEVICE_TREZOR_DEBUG "Trezor Debugging enabled" OFF) +OPTION(TREZOR_DEBUG "Main trezor debugging switch" OFF) # Helper function to fix cmake < 3.6.0 FindProtobuf variables function(_trezor_protobuf_fix_vars) @@ -53,6 +55,14 @@ if (USE_DEVICE_TREZOR) set(Protobuf_FOUND 1) # override found if all rquired info was provided by variables endif() + if(TREZOR_DEBUG) + set(USE_DEVICE_TREZOR_DEBUG 1) + endif() + + # Compile debugging support (for tests) + if (USE_DEVICE_TREZOR_DEBUG) + add_definitions(-DWITH_TREZOR_DEBUGGING=1) + endif() else() message(STATUS "Trezor support disabled by USE_DEVICE_TREZOR") endif() @@ -106,7 +116,12 @@ endif() if(Protobuf_FOUND AND USE_DEVICE_TREZOR AND TREZOR_PYTHON AND Protobuf_COMPILE_TEST_PASSED) set(ENV{PROTOBUF_INCLUDE_DIRS} "${Protobuf_INCLUDE_DIR}") set(ENV{PROTOBUF_PROTOC_EXECUTABLE} "${Protobuf_PROTOC_EXECUTABLE}") - execute_process(COMMAND ${TREZOR_PYTHON} tools/build_protob.py WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR) + set(TREZOR_PROTOBUF_PARAMS "") + if (USE_DEVICE_TREZOR_DEBUG) + set(TREZOR_PROTOBUF_PARAMS "--debug") + endif() + + execute_process(COMMAND ${TREZOR_PYTHON} tools/build_protob.py ${TREZOR_PROTOBUF_PARAMS} WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/../src/device_trezor/trezor RESULT_VARIABLE RET OUTPUT_VARIABLE OUT ERROR_VARIABLE ERR) if(RET) message(WARNING "Trezor protobuf messages could not be regenerated (err=${RET}, python ${PYTHON})." "OUT: ${OUT}, ERR: ${ERR}." diff --git a/cmake/FindUnbound.cmake b/cmake/FindUnbound.cmake index a392d59ca..e3eb3d67e 100644 --- a/cmake/FindUnbound.cmake +++ b/cmake/FindUnbound.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2018, The Monero Project +# Copyright (c) 2014-2019, The Monero Project # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are diff --git a/cmake/GenVersion.cmake b/cmake/GenVersion.cmake index 289115175..1ea5b209c 100644 --- a/cmake/GenVersion.cmake +++ b/cmake/GenVersion.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2018, The Monero Project +# Copyright (c) 2014-2019, The Monero Project # # All rights reserved. # diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 3677e80d7..632c1431c 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2018, The Monero Project +# Copyright (c) 2014-2019, The Monero Project # # All rights reserved. # diff --git a/cmake/test-libusb-version.c b/cmake/test-libusb-version.c index 309e4ad27..b80191b58 100644 --- a/cmake/test-libusb-version.c +++ b/cmake/test-libusb-version.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2018, The Monero Project +// Copyright (c) 2014-2019, The Monero Project // // All rights reserved. // diff --git a/cmake/test-protobuf.cpp b/cmake/test-protobuf.cpp index 532df7cbe..0a1ca82be 100644 --- a/cmake/test-protobuf.cpp +++ b/cmake/test-protobuf.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2018, The Monero Project +// Copyright (c) 2014-2019, The Monero Project // // All rights reserved. // diff --git a/cmake/test-static-assert.c b/cmake/test-static-assert.c index 28a80a972..2e6c84839 100644 --- a/cmake/test-static-assert.c +++ b/cmake/test-static-assert.c @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2018, The Monero Project +// Copyright (c) 2014-2019, The Monero Project // // All rights reserved. // diff --git a/cmake/test-static-assert.cpp b/cmake/test-static-assert.cpp index 28a80a972..2e6c84839 100644 --- a/cmake/test-static-assert.cpp +++ b/cmake/test-static-assert.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2014-2018, The Monero Project +// Copyright (c) 2014-2019, The Monero Project // // All rights reserved. // |