Skip to content

Commit

Permalink
Merge remote-tracking branch 'pleroux0/feature/improve-conan-integrat…
Browse files Browse the repository at this point in the history
…ion' into test-0.3.7
  • Loading branch information
ericniebler committed Sep 20, 2018
2 parents 291ffbb + f24dca1 commit e9ca2c8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ set(CMAKE_REQUIRED_FLAGS "-fcoroutines-ts")
check_cxx_source_compiles("${RANGE_V3_CORO_TEST_CODE}" RANGE_V3_HAS_FCOROUTINES_TS)
unset(CMAKE_REQUIRED_FLAGS)

add_subdirectory(doc)
if(RANGE_V3_DOCS)
add_subdirectory(doc)
endif()

if(RANGE_V3_TESTS)
add_subdirectory(test)
Expand Down
4 changes: 4 additions & 0 deletions cmake/ranges_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ CMAKE_DEPENDENT_OPTION(RANGE_V3_PERF
"Build the Range-v3 performance benchmarks"
ON "${is_subproject}" OFF)

CMAKE_DEPENDENT_OPTION(RANGE_V3_DOCS
"Build the Range-v3 documentation"
ON "${is_subproject}" OFF)

mark_as_advanced(RANGE_V3_PERF)
20 changes: 17 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,30 @@
# Project home: https://github.com/ericniebler/range-v3
#

from conans import ConanFile
from conans import ConanFile, CMake

class Rangev3Conan(ConanFile):
name = "range-v3"
license = "Boost Software License - Version 1.0 - August 17th, 2003"
url = "https://github.com/ericniebler/range-v3"
description = """Experimental range library for C++11/14/17"""
exports_sources = "include*", "LICENSE.txt"
settings = "compiler", "arch"
exports_sources = "include*", "LICENSE.txt", "CMakeLists.txt", "cmake/*", "Version.cmake", "version.hpp.in"
build_policy = "missing"

def build(self):
pass

def package(self):
self.copy("*.hpp", src="include", dst="include", keep_path=True)
cmake = CMake(self)
cmake.definitions["BUILD_TESTING"] = "OFF"
cmake.definitions["RANGE_V3_EXAMPLES"] = "OFF"
cmake.definitions["RANGE_V3_PERF"] = "OFF"
cmake.definitions["RANGE_V3_DOCS"] = "OFF"
cmake.configure()
cmake.install()

self.copy("LICENSE.txt", dst="licenses", ignore_case=True, keep_path=False)

def package_info(self):
self.info.header_only()

0 comments on commit e9ca2c8

Please sign in to comment.