mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-12-01 22:16:27 +00:00
f61ce5d10b
* Pass toolchain and user env variables to make invocation * Rename configure --> make * Add integration test coverage for make flag passing This requires making the make_simple Makefile more realistic by * using CXX and forwarding it to the wrapper; * using CXXFLAGS instead of CXX_FLAGS and not overwriting its contents.
19 lines
468 B
C++
19 lines
468 B
C++
#include "liba.h"
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <stdexcept>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
std::string result = hello_liba();
|
|
if (result != "Hello from LIBA!") {
|
|
throw std::runtime_error("Wrong result: " + result);
|
|
}
|
|
double math_result = hello_math(0.5);
|
|
if (math_result < 1.047 || math_result > 1.048) {
|
|
throw std::runtime_error("Wrong math_result: " + std::to_string(math_result));
|
|
}
|
|
std::cout << "Everything's fine!";
|
|
}
|