mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-25 03:53:32 +01:00

Added capability for CONTROL files to specify qualified dependencies, which are substring searched inside triplet names. Fixed bug in internal 'build' command where if a package is already built, that built package's dependencies will be used to determine requirements for the build instead of the port directory's CONTROL file.
44 lines
911 B
C++
44 lines
911 B
C++
#include "vcpkg_Checks.h"
|
|
|
|
#include <stdexcept>
|
|
#include "vcpkg_System.h"
|
|
|
|
namespace vcpkg {namespace Checks
|
|
{
|
|
void unreachable()
|
|
{
|
|
System::println(System::color::error, "Error: Unreachable code was reached");
|
|
#ifndef NDEBUG
|
|
std::abort();
|
|
#endif
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
void exit_with_message(const char* errorMessage)
|
|
{
|
|
System::println(System::color::error, errorMessage);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
void throw_with_message(const char* errorMessage)
|
|
{
|
|
throw std::runtime_error(errorMessage);
|
|
}
|
|
|
|
void check_throw(bool expression, const char* errorMessage)
|
|
{
|
|
if (!expression)
|
|
{
|
|
throw_with_message(errorMessage);
|
|
}
|
|
}
|
|
|
|
void check_exit(bool expression, const char* errorMessage)
|
|
{
|
|
if (!expression)
|
|
{
|
|
exit_with_message(errorMessage);
|
|
}
|
|
}
|
|
}}
|