playground/cmake_demo/simple_library/src/simple_library.cpp
2024-08-31 22:26:15 -04:00

34 lines
641 B
C++

#include "simple/simple_library.h"
#include "simple/version.h"
#include "internal.h"
#include <iostream>
using std::cout;
using std::endl;
int add(int a, int b) {
int rv = (a + b) * getvalue();
cout << "a: " << a << endl;
cout << "b: " << b << endl;
cout << "c: " << getvalue() << endl;
cout << "(a + b) * c = " << rv << endl;
return rv;
return (a + b) * getvalue();
}
const char *getCustomValue() {
return SIMPLE_LIBRARY_CUSTOM_VALUE;
}
const char *getVersion() {
return SIMPLE_LIBRARY_VERSION;
}
const char *getGitHash() {
return SIMPLE_LIBRARY_GIT_HASH;
}
const char *getGitBranch() {
return SIMPLE_LIBRARY_GIT_BRANCH;
}