kopia lustrzana https://github.com/stlink-org/stlink
rodzic
a2a707e4f7
commit
95b6e03ed0
|
@ -46,11 +46,6 @@ if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
|
|||
include(CTest)
|
||||
endif()
|
||||
|
||||
# fixup __FILE__ absolute paths in logging module
|
||||
# see: https://cmake.org/pipermail/cmake-developers/2015-January/024202.html
|
||||
string(LENGTH "${CMAKE_SOURCE_DIR}/" CMAKE_SOURCE_DIR_LENGTH)
|
||||
add_definitions(-DCMAKE_SOURCE_DIR_LENGTH=${CMAKE_SOURCE_DIR_LENGTH})
|
||||
|
||||
set(STLINK_HEADERS
|
||||
include/stlink.h
|
||||
include/stlink/usb.h
|
||||
|
|
|
@ -20,10 +20,8 @@ enum ugly_loglevel {
|
|||
int ugly_init(int maximum_threshold);
|
||||
int ugly_log(int level, const char *tag, const char *format, ...);
|
||||
|
||||
#ifndef CMAKE_SOURCE_DIR_LENGTH
|
||||
#define CMAKE_SOURCE_DIR_LENGTH 0
|
||||
#endif
|
||||
#define UGLY_LOG_FILE (__FILE__+CMAKE_SOURCE_DIR_LENGTH)
|
||||
#define UGLY_LOG_FILE (strstr(__FILE__, "/") != NULL ? \
|
||||
strrchr(__FILE__, '/') + 1 : strrchr(__FILE__, '\\') + 1)
|
||||
|
||||
/** @todo we need to write this in a more generic way, for now this should compile
|
||||
on visual studio (See http://stackoverflow.com/a/8673872/1836746) */
|
||||
|
|
Ładowanie…
Reference in New Issue