1#ifndef CPPAD_CG_GCC_COMPILER_INCLUDED
2#define CPPAD_CG_GCC_COMPILER_INCLUDED
34 this->_compileFlags.push_back(
"-O2");
35 this->_compileLibFlags.push_back(
"-O2");
36 this->_compileLibFlags.push_back(
"-shared");
37 this->_compileLibFlags.push_back(
"-rdynamic");
51#if CPPAD_CG_SYSTEM_APPLE
53#elif CPPAD_CG_SYSTEM_LINUX
57 for (
size_t i = 0;
i < this->_linkFlags.size();
i++)
60 std::vector<std::string>
args;
61 args.insert(
args.end(),
this->_compileLibFlags.begin(),
this->_compileLibFlags.end());
65 for (
const std::string&
it : this->_ofiles) {
69 if (
timer !=
nullptr) {
70 timer->startingJob(
"'" +
library +
"'", JobTimer::COMPILING_DYNAMIC_LIBRARY);
71 }
else if (this->_verbose) {
72 std::cout <<
"building library '" <<
library <<
"'" << std::endl;
77 if (
timer !=
nullptr) {
95 std::vector<std::string>
args;
98 args.insert(
args.end(),
this->_compileFlags.begin(),
this->_compileFlags.end());
102 args.push_back(
"-fPIC");
104 args.push_back(
"-o");
111 const std::string&
output,
113 std::vector<std::string>
args;
114 args.push_back(
"-x");
116 args.insert(
args.end(),
this->_compileFlags.begin(),
this->_compileFlags.end());
118 args.push_back(
"-fPIC");
120 args.push_back(
"-c");
122 args.push_back(
"-o");
void compileFile(const std::string &path, const std::string &output, bool posIndepCode) override
void buildDynamic(const std::string &library, JobTimer *timer=nullptr) override
void compileSource(const std::string &source, const std::string &output, bool posIndepCode) override
void callExecutable(const std::string &executable, const std::vector< std::string > &args, std::string *stdOutErrMessage=nullptr, const std::string *stdInMessage=nullptr)
bool GreaterThanZero(const cg::CG< Base > &x)