File tree Expand file tree Collapse file tree 2 files changed +33
-8
lines changed
ReflectionTemplateLib/common Expand file tree Collapse file tree 2 files changed +33
-8
lines changed Original file line number Diff line number Diff line change @@ -30,33 +30,31 @@ endif()
3030# ===============================
3131set (RTL_INCLUDE_DIRS
3232 inc
33- "${CMAKE_SOURCE_DIR} /CxxTestUtils/inc"
34- "${CMAKE_SOURCE_DIR} /CxxRTLTypeRegistration/inc"
3533 "${CMAKE_SOURCE_DIR} /ReflectionTemplateLib/common"
3634 "${CMAKE_SOURCE_DIR} /ReflectionTemplateLib/detail/inc"
3735 "${CMAKE_SOURCE_DIR} /ReflectionTemplateLib/access/inc"
3836 "${CMAKE_SOURCE_DIR} /ReflectionTemplateLib/builder/inc"
3937)
4038
4139# ===============================
42- # Benchmarks (only target)
40+ # Test Executable
4341# ===============================
42+ set (CXX_EXE_NAME RTLBenchmarkApp)
43+
4444# ===============================
4545# Benchmarks (only target)
4646# ===============================
47- add_executable (RTLBenchmarkApp
47+ add_executable (${CXX_EXE_NAME}
4848 src/main.cpp
4949 src/BenchMark.cpp # <-- added
5050 src/BenchMark.h # <-- optional (for IDE visibility)
5151)
5252
5353
54- target_include_directories (RTLBenchmarkApp PRIVATE ${RTL_INCLUDE_DIRS} )
54+ target_include_directories (${CXX_EXE_NAME} PRIVATE ${RTL_INCLUDE_DIRS} )
5555
56- target_link_libraries (RTLBenchmarkApp
56+ target_link_libraries (${CXX_EXE_NAME}
5757 PRIVATE
5858 benchmark
59- CxxTestUtils
6059 ReflectionTemplateLib
61- CxxRTLTypeRegistration
6260)
Original file line number Diff line number Diff line change 1+ #pragma once
2+ // #include <iostream>
3+
4+ #ifdef RTL_DEBUG
5+
6+ // Runs arbitrary code safely in Debug builds (single-statement safe)
7+ #define RTL_DEBUG_ONLY (code ) do { code } while (0 )
8+
9+ // Simple debug log
10+ // #define RTL_LOG(msg) do { std::cout << "[RTL-DEBUG] " << msg << '\n'; } while(0)
11+
12+ // Exception-free assert: if condition fails, prints message and returns error code
13+ // #define RTL_ASSERT(cond, err_code) do { \
14+ // if (!(cond)) { \
15+ // std::cerr << "[RTL-ASSERT] " #cond " failed!\n"; \
16+ // return err_code; \
17+ // } \
18+ // } while(0)
19+
20+ #else
21+
22+ // Release builds: completely stripped out
23+ #define RTL_DEBUG_ONLY (code ) do {} while (0 )
24+ // #define RTL_LOG(msg) do {} while(0)
25+ // #define RTL_ASSERT(cond, err_code) do {} while(0)
26+
27+ #endif
You can’t perform that action at this time.
0 commit comments