include(CheckFunctionExists) check_function_exists(re_comp HAVE_RE_COMP) if(HAVE_RE_COMP) list(APPEND LDFLAGS -lm) llvm_multisource(plot2fig) endif()