Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

以 GCC 7 作为 RMVL 支持的最低标准 #60

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmake/check/cxx17-filesystem.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <filesystem>

int main()
{
return 0;
}
3 changes: 1 addition & 2 deletions cmake/check/cxx17.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ constexpr int f()
template <typename... Args>
inline auto sum_add_1(Args... args) { return (args + ... + 1); }

// 库支持
#include <filesystem>
// 库支持(以 GCC 7 为最低标准)
#include <optional>
#include <variant>
#include <any>
Expand Down
2 changes: 2 additions & 0 deletions samples/detector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ endif()

set(camera_tmp hik mv)

rmvl_check_cxx(HAVE_STD_FILESYSTEM "cxx17-filesystem.cpp" "-std=c++17")

foreach(_sub ${camera_tmp})
add_subdirectory(${_sub})
endforeach()
12 changes: 7 additions & 5 deletions samples/detector/hik/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ if(NOT BUILD_rmvl_hik_camera OR NOT BUILD_rmvl_armor_detector)
return()
endif()

rmvl_add_exe(
rmvl_hik_armor_collection
SOURCES sample_hik_armor_collection.cpp
DEPENDS hik_camera armor_detector
)
if(HAVE_STD_FILESYSTEM)
rmvl_add_exe(
rmvl_hik_armor_collection
SOURCES sample_hik_armor_collection.cpp
DEPENDS hik_camera armor_detector
)
endif()

rmvl_add_exe(
rmvl_hik_armor_size_classify
Expand Down
12 changes: 7 additions & 5 deletions samples/detector/mv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ if(NOT BUILD_rmvl_mv_camera OR NOT BUILD_rmvl_armor_detector)
return()
endif()

rmvl_add_exe(
rmvl_mv_armor_collection
SOURCES sample_mv_armor_collection.cpp
DEPENDS mv_camera armor_detector
)
if(HAVE_STD_FILESYSTEM)
rmvl_add_exe(
rmvl_mv_armor_collection
SOURCES sample_mv_armor_collection.cpp
DEPENDS mv_camera armor_detector
)
endif()

rmvl_add_exe(
rmvl_mv_armor_size_classify
Expand Down
Loading