mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
- Depends on cppdap and jsoncpp. - Add --debugger argument to enable the Debugger. - Add --debugger-pipe argument for DAP traffics over named pipes. - Support breakpoints by filenames and line numbers. - Support exception breakpoints. - Call stack shows filenames and line numbers. - Show Cache Variables. - Show the state of currently defined targets, tests and directories with their properties. - Add cmakeVersion to DAP initialize response. - Include unit tests. Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
31 lines
998 B
C++
31 lines
998 B
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
#pragma once
|
|
|
|
#include <functional>
|
|
#include <iostream>
|
|
#include <vector>
|
|
|
|
#define ASSERT_TRUE(x) \
|
|
do { \
|
|
if (!(x)) { \
|
|
std::cout << "ASSERT_TRUE(" #x ") failed on line " << __LINE__ << "\n"; \
|
|
return false; \
|
|
} \
|
|
} while (false)
|
|
|
|
inline int runTests(std::vector<std::function<bool()>> const& tests)
|
|
{
|
|
for (auto const& test : tests) {
|
|
if (!test()) {
|
|
return 1;
|
|
}
|
|
std::cout << ".";
|
|
}
|
|
|
|
std::cout << " Passed" << std::endl;
|
|
return 0;
|
|
}
|
|
|
|
#define BOOL_STRING(b) ((b) ? "TRUE" : "FALSE")
|