mirror of https://github.com/sharkdp/fd.git
Require boost 1.60
This commit is contained in:
parent
723be8b366
commit
04892d2290
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1.0)
|
|||
|
||||
project(fnd CXX)
|
||||
|
||||
find_package(Boost 1.54 REQUIRED COMPONENTS system filesystem)
|
||||
find_package(Boost 1.60 REQUIRED COMPONENTS system filesystem)
|
||||
include_directories( ${Boost_INCLUDE_DIR} )
|
||||
|
||||
file(GLOB SOURCES "src/*.cpp")
|
||||
|
|
|
@ -27,7 +27,7 @@ CMakeLists.txt
|
|||
|
||||
## Dependencies
|
||||
* g++ `>=4.9`
|
||||
* boost `>=1.54`
|
||||
* boost `>=1.60`
|
||||
|
||||
## Build
|
||||
```bash
|
||||
|
|
|
@ -23,10 +23,8 @@ void printPath(const fs::path& path) {
|
|||
void findFiles(const std::regex& pattern) {
|
||||
const fs::path& currentPath = fs::current_path();
|
||||
|
||||
fs::recursive_directory_iterator entry;
|
||||
for (entry = fs::recursive_directory_iterator(currentPath);
|
||||
entry != fs::recursive_directory_iterator(); ++entry) {
|
||||
const fs::path& path = entry->path();
|
||||
for (auto& entry: fs::recursive_directory_iterator(currentPath)) {
|
||||
const fs::path& path = entry.path().lexically_relative(currentPath);
|
||||
|
||||
if (std::regex_search(path.string(), pattern)) {
|
||||
printPath(path);
|
||||
|
|
Loading…
Reference in New Issue