Skip to content

Commit

Permalink
Added test for grep.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanemagnenat committed Aug 19, 2013
1 parent a253965 commit 8452cf2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -8,9 +8,13 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
execute_process(
COMMAND grep "NABO_VERSION " nabo/nabo.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GREP_VERSION_RESULT
OUTPUT_VARIABLE PROJECT_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (NOT GREP_VERSION_RESULT EQUAL 0)
message(SEND_ERROR "Cannot grep version number: ${GREP_VERSION_RESULT}")
endif (NOT GREP_VERSION_RESULT EQUAL 0)
string(REGEX REPLACE ".*\"(.*)\".*" "\\1" PROJECT_VERSION "${PROJECT_VERSION}" )

# Documentation
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -36,6 +36,7 @@ Prerequisites

If your operating system does not provide it, you must get [Eigen] and [Boost].
[Eigen] only needs to be downloaded and extracted.
You also need `grep`, which is available in standard on Linux or Mac OS X, you can get the window version [here](http://gnuwin32.sourceforge.net/packages/grep.htm).

Compilation options
-------------------
Expand Down

0 comments on commit 8452cf2

Please sign in to comment.