benchmarks: print version of tested libraries
This commit is contained in:
parent
b4623ab06e
commit
a9f4dc5299
@ -17,7 +17,8 @@ file(GLOB COMMONS_FILES commons/*)
|
|||||||
set(COMMONS_FILES ${COMMONS_FILES})
|
set(COMMONS_FILES ${COMMONS_FILES})
|
||||||
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR}/src)
|
include_directories(${CMAKE_SOURCE_DIR}/src)
|
||||||
include_directories(${CMAKE_BINARY_DIR}/src/gmio_core) # For cmake generated headers
|
include_directories(${CMAKE_BINARY_DIR}/src) # For cmake generated headers
|
||||||
|
include_directories(${CMAKE_BINARY_DIR}/src/gmio_core)
|
||||||
link_libraries(gmio)
|
link_libraries(gmio)
|
||||||
if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE)
|
if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE)
|
||||||
link_libraries(m) # -lm
|
link_libraries(m) # -lm
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <assimp/version.h>
|
#include <assimp/version.h>
|
||||||
|
|
||||||
#include <gmio_core/error.h>
|
#include <gmio_core/error.h>
|
||||||
|
#include <gmio_core/version.h>
|
||||||
#include <gmio_stl/stl_io.h>
|
#include <gmio_stl/stl_io.h>
|
||||||
#include <gmio_stl/stl_io_options.h>
|
#include <gmio_stl/stl_io_options.h>
|
||||||
#include <gmio_stl/stl_triangle.h>
|
#include <gmio_stl/stl_triangle.h>
|
||||||
@ -43,14 +44,12 @@ static unsigned totalTriangleCount(const aiScene* scene)
|
|||||||
return meshnum;
|
return meshnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
GMIO_INLINE void copy_gmio_vec3f(
|
GMIO_INLINE void copy_gmio_vec3f(aiVector3D* vec3, const gmio_vec3f& coords)
|
||||||
aiVector3D* vec3, const gmio_vec3f& coords)
|
|
||||||
{
|
{
|
||||||
*vec3 = *((aiVector3D*)&coords);
|
*vec3 = *((aiVector3D*)&coords);
|
||||||
}
|
}
|
||||||
|
|
||||||
GMIO_INLINE void copy_aiVector3D(
|
GMIO_INLINE void copy_aiVector3D(gmio_vec3f* coords, const aiVector3D& vec3)
|
||||||
gmio_vec3f* coords, const aiVector3D& vec3)
|
|
||||||
{
|
{
|
||||||
*coords = *((gmio_vec3f*)&vec3);
|
*coords = *((gmio_vec3f*)&vec3);
|
||||||
}
|
}
|
||||||
@ -60,10 +59,7 @@ namespace BmkAssimp {
|
|||||||
static std::string assimp_version_str()
|
static std::string assimp_version_str()
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "Assimp v"
|
ss << aiGetVersionMajor() << '.' << aiGetVersionMinor() << ".?";
|
||||||
<< aiGetVersionMajor() << '.'
|
|
||||||
<< aiGetVersionMinor()
|
|
||||||
<< ".?";
|
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +342,11 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
const char* filepath = argv[1];
|
const char* filepath = argv[1];
|
||||||
std::cout << std::endl << "Input file: " << filepath << std::endl;
|
std::cout << std::endl
|
||||||
|
<< "gmio v" << GMIO_VERSION_STR << std::endl
|
||||||
|
<< "Assimp v" << BmkAssimp::assimp_version_str() << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< "Input file: " << filepath << std::endl;
|
||||||
|
|
||||||
/* Declare benchmarks */
|
/* Declare benchmarks */
|
||||||
const benchmark_cmp_arg cmp_args[] = {
|
const benchmark_cmp_arg cmp_args[] = {
|
||||||
@ -374,8 +374,8 @@ int main(int argc, char** argv)
|
|||||||
/* Print results */
|
/* Print results */
|
||||||
const benchmark_cmp_result_array res_array = {
|
const benchmark_cmp_result_array res_array = {
|
||||||
&cmp_res_vec.at(0), cmp_res_vec.size() };
|
&cmp_res_vec.at(0), cmp_res_vec.size() };
|
||||||
const std::string assimp_ver = BmkAssimp::assimp_version_str();
|
const benchmark_cmp_result_header header = {
|
||||||
const benchmark_cmp_result_header header = { "gmio", assimp_ver.c_str() };
|
"gmio", "Assimp" };
|
||||||
benchmark_print_results(
|
benchmark_print_results(
|
||||||
BENCHMARK_PRINT_FORMAT_MARKDOWN, header, res_array);
|
BENCHMARK_PRINT_FORMAT_MARKDOWN, header, res_array);
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <Standard_Version.hxx>
|
#include <Standard_Version.hxx>
|
||||||
|
|
||||||
#include <gmio_core/error.h>
|
#include <gmio_core/error.h>
|
||||||
|
#include <gmio_core/version.h>
|
||||||
#include <gmio_stl/stl_io.h>
|
#include <gmio_stl/stl_io.h>
|
||||||
#include <gmio_stl/stl_io_options.h>
|
#include <gmio_stl/stl_io_options.h>
|
||||||
#include <gmio_support/stl_occ.h>
|
#include <gmio_support/stl_occ.h>
|
||||||
@ -100,7 +101,11 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
if (argc > 1) {
|
if (argc > 1) {
|
||||||
const char* filepath = argv[1];
|
const char* filepath = argv[1];
|
||||||
std::cout << std::endl << "Input file: " << filepath << std::endl;
|
std::cout << std::endl
|
||||||
|
<< "gmio v" << GMIO_VERSION_STR << std::endl
|
||||||
|
<< "OpenCascade v" << OCC_VERSION_COMPLETE << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< "Input file: " << filepath << std::endl;
|
||||||
|
|
||||||
/* Declare benchmarks */
|
/* Declare benchmarks */
|
||||||
const benchmark_cmp_arg cmp_args[] = {
|
const benchmark_cmp_arg cmp_args[] = {
|
||||||
@ -128,7 +133,7 @@ int main(int argc, char** argv)
|
|||||||
const benchmark_cmp_result_array res_array = {
|
const benchmark_cmp_result_array res_array = {
|
||||||
&cmp_res_vec.at(0), cmp_res_vec.size() };
|
&cmp_res_vec.at(0), cmp_res_vec.size() };
|
||||||
const benchmark_cmp_result_header header = {
|
const benchmark_cmp_result_header header = {
|
||||||
"gmio", "OpenCascade v"OCC_VERSION_COMPLETE };
|
"gmio", "OpenCascade" };
|
||||||
benchmark_print_results(
|
benchmark_print_results(
|
||||||
BENCHMARK_PRINT_FORMAT_MARKDOWN, header, res_array);
|
BENCHMARK_PRINT_FORMAT_MARKDOWN, header, res_array);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user