Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Galland
VTK
Commits
04330db0
Commit
04330db0
authored
4 years ago
by
Orion Poplawski
Committed by
Ben Boeckel
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
FindPEGTL: add find module
parent
8c9bccfb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMake/FindPEGTL.cmake
+49
-0
49 additions, 0 deletions
CMake/FindPEGTL.cmake
with
49 additions
and
0 deletions
CMake/FindPEGTL.cmake
0 → 100644
+
49
−
0
View file @
04330db0
# - Try to find PEGTL lib
#
# This module supports requiring a minimum version, e.g. you can do
# find_package(PEGTL 3.1.2)
# to require version 3.1.2 or newer of PEGTL.
#
# Once done this will define
#
# PEGTL_FOUND - system has eigen lib with correct version
# PEGTL_INCLUDE_DIRS - the eigen include directory
# PEGTL_VERSION - eigen version
#
# And the following imported target:
#
# PEGTL::PEGTL
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
find_path
(
PEGTL_INCLUDE_DIR
NAMES pegtl/version.hpp
PATH_SUFFIXES tao
DOC
"Path to PEGTL headers"
)
mark_as_advanced
(
PEGTL_INCLUDE_DIR
)
if
(
PEGTL_INCLUDE_DIR
)
file
(
STRINGS
"
${
PEGTL_INCLUDE_DIR
}
/pegtl/version.hpp"
_pegtl_version_header
REGEX
"TAO_PEGTL_VERSION"
)
string
(
REGEX MATCH
"define[
\t
]+TAO_PEGTL_VERSION[
\t
]+
\"
([0-9.]+)
\"
"
_pegtl_version_match
"
${
_pegtl_version_header
}
"
)
set
(
PEGTL_VERSION
"
${
CMAKE_MATCH_1
}
"
)
unset
(
_pegtl_version_header
)
unset
(
_pegtl_version_match
)
endif
()
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
PEGTL
REQUIRED_VARS PEGTL_INCLUDE_DIR
VERSION_VAR PEGTL_VERSION
)
if
(
PEGTL_FOUND
)
set
(
PEGTL_INCLUDE_DIRS
"
${
PEGTL_INCLUDE_DIR
}
"
)
if
(
NOT TARGET PEGTL::PEGTL
)
add_library
(
PEGTL::PEGTL INTERFACE IMPORTED
)
set_target_properties
(
PEGTL::PEGTL PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
PEGTL_INCLUDE_DIR
}
"
)
endif
()
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment