Merge pull request #574 from andlaus/allow_opm-parser_to_fail

allow the opm-parser test to fail
This commit is contained in:
Bård Skaflestad 2014-04-23 19:51:09 +02:00
commit a51296a3b1

View File

@ -105,15 +105,21 @@ find_library (OPM_JSON_LIBRARY
# get the prerequisite CJSON library
if (NOT CJSON_FOUND)
find_package (cjson REQUIRED ${OPM_PARSER_QUIET})
find_package (cjson ${OPM_PARSER_QUIET})
endif ()
if (NOT CJSON_FOUND)
set(opm-parser_FOUND "0")
else()
# get the prerequisite Boost libraries
if (NOT Boost_FOUND)
find_package(Boost 1.44.0
COMPONENTS filesystem date_time system unit_test_framework REQUIRED ${OPM_PARSER_QUIET})
COMPONENTS filesystem date_time system unit_test_framework ${OPM_PARSER_QUIET})
endif ()
if (NOT Boost_FOUND)
set(opm-parser_FOUND "0")
else()
# setup list of all required libraries to link with opm-parser. notice that
# we use the plural form to get *all* the libraries needed by cjson
set (OPM_PARSER_INCLUDE_DIRS
@ -161,4 +167,13 @@ find_package_handle_standard_args (OPM_PARSER
DEFAULT_MSG
OPM_PARSER_INCLUDE_DIRS OPM_PARSER_LIBRARIES HAVE_OPM_PARSER
)
endif() # BOOST
endif() # cJSON
set (opm-parser_FOUND ${OPM_PARSER_FOUND})
if(OPM_PARSER_FOUND)
set (HAVE_OPM_PARSER "1")
else()
set (HAVE_OPM_PARSER "0")
endif()
set (opm-parser_CONFIG_VARS "HAVE_OPM_PARSER")