tools: add a backtrace generating test
This commit is contained in:
parent
7a5fa7fa2d
commit
c63bc5df4e
@ -619,7 +619,7 @@ endif ()
|
|||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
foreach (tool cpuid log poisson macro scratch)
|
foreach (tool backtrace cpuid log poisson macro scratch)
|
||||||
add_executable (util_${tool} tools/${tool}.cpp)
|
add_executable (util_${tool} tools/${tool}.cpp)
|
||||||
set_target_properties (util_${tool} PROPERTIES OUTPUT_NAME ${tool})
|
set_target_properties (util_${tool} PROPERTIES OUTPUT_NAME ${tool})
|
||||||
target_link_libraries (util_${tool} cruft)
|
target_link_libraries (util_${tool} cruft)
|
||||||
|
17
tools/backtrace.cpp
Normal file
17
tools/backtrace.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
*
|
||||||
|
* Copyright 2019, Danny Robson <danny@nerdcruft.net>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <cruft/util/backtrace.hpp>
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
|
int main ()
|
||||||
|
{
|
||||||
|
std::cout << cruft::backtrace () << '\n';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user