Skip to content

Commit

Permalink
Document -DDIRENT_BUILD_TESTS
Browse files Browse the repository at this point in the history
  • Loading branch information
tronkko committed Jun 28, 2020
1 parent 4be0ed3 commit 0a2fbbd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ project (dirent LANGUAGES C CXX)

# User options
option(DIRENT_BUILD_TESTS "Build bundled tests" ON)
message(STATUS "Build test and example programs: ${DIRENT_BUILD_TESTS}")

# Initialize C and C++ compilers
enable_language (C CXX)
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ Program | Purpose
ls | List files in a directory, e.g. ls "c:\Program Files"
find | Find files in subdirectories, e.g. find "c:\Program Files\CMake"
updatedb | Build database of files in a drive, e.g. updatedb c:\
locate | Locate a file from database, e.g. locate notepad.exe
locate | Locate a file from database, e.g. locate notepad
scandir | Demonstrate scandir() function
cat | Print a text file to screen

To build the example programs, first install [CMake](https://cmake.org/).
Then, with CMake installed, open command prompt and create a temporary
Expand Down Expand Up @@ -79,6 +81,9 @@ updatedb c:\
locate cmd.exe
```

You can omit generation of test and example programs by appending option
`-DDIRENT_BUILD_TESTS=OFF` to the CMake command line.


# Copying

Expand Down

0 comments on commit 0a2fbbd

Please sign in to comment.