Skip to content

Commit

Permalink
[tools/kbenchmark] Remove boost filesystem dependency (Samsung#12451)
Browse files Browse the repository at this point in the history
This commit removes boost::filesystem dependency.
It includes typo fix in cmake.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Jan 12, 2024
1 parent 46305e4 commit 8f01125
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion infra/cmake/packages/NoniusSourceConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function(_NoniusSource_import)
# This header file is modified to show the html summary view according to the layer in kbenchmark.
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_CURRENT_LIST_DIR}/Nonius/html_report_template.g.h++"
"${NoniusSource_DIR}/include/nonius/detail")
"${Nonius_Source_DIR}/include/nonius/detail")
endif(BUILD_KBENCHMARK)

set(NoniusSource_DIR ${NONIUS_SOURCE_DIR} PARENT_SCOPE)
Expand Down
6 changes: 3 additions & 3 deletions tools/kbenchmark/Args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "Args.h"

#include <iostream>
#include <boost/filesystem.hpp>
#include <filesystem>

namespace kbenchmark
{
Expand Down Expand Up @@ -73,7 +73,7 @@ void Args::Initialize(const int argc, char **argv)
exit(1);
}

if (!boost::filesystem::exists(_config))
if (!std::filesystem::exists(_config))
{
std::cerr << _config << " file not found" << std::endl;
exit(1);
Expand All @@ -84,7 +84,7 @@ void Args::Initialize(const int argc, char **argv)
{
for (auto &k : _kernel)
{
if (!boost::filesystem::exists(k))
if (!std::filesystem::exists(k))
{
std::cerr << k << " file not found" << std::endl;
exit(1);
Expand Down
10 changes: 7 additions & 3 deletions tools/kbenchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Use C++17 for kbenchmark
# TODO Remove this when we use C++17 for all runtime directories
set(CMAKE_CXX_STANDARD 17)

if(NOT BUILD_KBENCHMARK)
return()
endif(NOT BUILD_KBENCHMARK)

nnas_find_package(Nonius QUIET)
nnfw_find_package(Nonius QUIET)

if(NOT Nonius_FOUND)
return()
endif(NOT Nonius_FOUND)

nnfw_find_package(Boost REQUIRED program_options system filesystem)
nnfw_find_package(Boost REQUIRED program_options)

if(NOT Boost_FOUND)
return()
Expand All @@ -22,7 +26,7 @@ target_compile_options(kbenchmark PRIVATE -Wno-psabi)
target_include_directories(kbenchmark PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(kbenchmark PUBLIC nonius)
target_link_libraries(kbenchmark PUBLIC dl)
target_link_libraries(kbenchmark PUBLIC pthread boost_program_options boost_system boost_filesystem)
target_link_libraries(kbenchmark PUBLIC pthread boost_program_options)
install(TARGETS kbenchmark DESTINATION bin)

# kernel libraries
Expand Down

0 comments on commit 8f01125

Please sign in to comment.