FindCXX11Features: check for a usable std::regex

and add a config.h variable in the opm-parser test.
This commit is contained in:
Andreas Lauser 2014-07-07 17:38:52 +02:00 committed by Bård Skaflestad
parent 8119580a8d
commit 4a7dea3747
2 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ CHECK_CXX_SOURCE_RUNS("
#include <regex>
int main(void)
{
std::regex r(\"AB.*|BC+\", std::regex::extended);
std::regex r(\"AB.*|BC+\");
if (!std::regex_match(\"AB\", r))
return 1;
if (!std::regex_match(\"ABC\", r))

View File

@ -159,7 +159,7 @@ find_package_handle_standard_args (opm-parser
opm-parser_INCLUDE_DIRS opm-parser_LIBRARIES HAVE_OPM_PARSER
)
set (opm-parser_CONFIG_VARS "HAVE_OPM_PARSER")
set (opm-parser_CONFIG_VARS "HAVE_OPM_PARSER;HAVE_REGEX")
set (opm-parser_FOUND ${OPM-PARSER_FOUND})
mark_as_advanced(opm-parser_LIBRARIES opm-parser_INCLUDE_DIRS OPM-PARSER_FOUND)