feat: setup GopTransform
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <iostream>
|
||||
#include <boost/dll/import.hpp>
|
||||
|
||||
TEST_CASE("foo")
|
||||
{
|
||||
@@ -17,3 +18,25 @@ TEST_CASE("tbb")
|
||||
<< std::this_thread::get_id() << std::endl;
|
||||
});
|
||||
}
|
||||
|
||||
TEST_CASE("boost dll")
|
||||
{
|
||||
std::cout << "Using Boost "
|
||||
<< BOOST_VERSION / 100000 << "." // major version
|
||||
<< BOOST_VERSION / 100 % 1000 << "." // minor version
|
||||
<< BOOST_VERSION % 100 // patch level
|
||||
<< std::endl;
|
||||
|
||||
|
||||
boost::shared_ptr<std::string> cpp_var = boost::dll::import_symbol<std::string>(
|
||||
"build/src/OpDefs/libenzoOps1.so", "myVar"
|
||||
);
|
||||
std::cout << "VAR: " << *cpp_var << "\n";
|
||||
|
||||
auto cpp11_func = boost::dll::import_symbol<void(int&&)>(
|
||||
"build/src/OpDefs/libenzoOps1.so", "newSopOperator"
|
||||
);
|
||||
|
||||
cpp11_func(5);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user