File: FeatureTests.cmake

package info (click to toggle)
sqlsmith 1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 540 kB
  • sloc: cpp: 3,221; sql: 175; makefile: 33; sh: 1
file content (22 lines) | stat: -rw-r--r-- 390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# borked std::regex

include(CheckCXXSourceCompiles)

# check for a broken std::regex
check_cxx_source_compiles([=[
#include <regex>
#include <iostream>

int main()
{
  std::regex re(".*OK.*");
  auto ret = std::regex_match("This should be OK", re);
  if (!ret) {
    std::cout << "not_matched" << std::endl;
    return 1;
  }

  return 0;
}
]=] std_regex_ok
        FAIL_REGEX not_matched)