Permalink
Browse files

Added test for grep.

  • Loading branch information...
1 parent a253965 commit 8452cf2b3a3c845b48b50d64d01c5804dd8af0ea @stephanemagnenat stephanemagnenat committed Aug 19, 2013
Showing with 5 additions and 0 deletions.
  1. +4 −0 CMakeLists.txt
  2. +1 −0 README.md
View
@@ -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
View
@@ -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
-------------------

0 comments on commit 8452cf2

Please sign in to comment.