-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve conan/cmake interoperation (nonstd-lite issue 32)
- Loading branch information
1 parent
150165d
commit a642934
Showing
1 changed file
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
from conans import ConanFile | ||
from conans import ConanFile, CMake | ||
|
||
class GslLiteConan(ConanFile): | ||
version = "0.34.0" | ||
name = "gsl-lite" | ||
description = "A single-file header-only version of ISO C++ Guidelines Support Library (GSL) for C++98, C++11 and later" | ||
license = "MIT License. https://opensource.org/licenses/MIT" | ||
url = "https://github.com/martinmoene/gsl-lite.git" | ||
exports_sources = "include/gsl/*", "include/*", "LICENSE" | ||
build_policy = "missing" | ||
exports_sources = "include/gsl/*", "CMakeLists.txt", "cmake/*", "LICENSE" | ||
build_policy = "missing" | ||
author = "Martin Moene" | ||
|
||
def build(self): | ||
"""Avoid warning on build step""" | ||
pass | ||
|
||
def package(self): | ||
"""Provide pkg/include/gsl/*.hpp""" | ||
self.copy("*.hpp") | ||
self.copy("include/gsl/gsl") | ||
"""Run CMake install""" | ||
cmake = CMake(self) | ||
cmake.definitions["GSL_LITE_OPT_BUILD_TESTS"] = "OFF" | ||
cmake.definitions["GSL_LITE_OPT_BUILD_EXAMPLES"] = "OFF" | ||
cmake.configure() | ||
cmake.install() | ||
|
||
def package_info(self): | ||
self.info.header_only() |