-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 Update conanfile definition to include tests
The conanfile has been updated to include the unit tests in the build process.
- Loading branch information
1 parent
4b09071
commit a5e7ea5
Showing
1 changed file
with
7 additions
and
14 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ class ExpectedConan(ConanFile): | |
# Package Info | ||
name = "Expected" | ||
version = "0.0.1" | ||
description = "Expect the unexpected" | ||
description = " A lightweight C++11-compatible error-handling mechanism" | ||
url = "https://github.com/bitwizeshift/Expected" | ||
author = "Matthew Rodusek <[email protected]>" | ||
license = "MIT" | ||
|
@@ -17,7 +17,8 @@ class ExpectedConan(ConanFile): | |
exports_sources = ( "CMakeLists.txt", | ||
"cmake/*", | ||
"include/*", | ||
"LICENSE" ) | ||
"test/*", | ||
"LICENSE") | ||
|
||
# Settings | ||
options = {} | ||
|
@@ -27,26 +28,18 @@ class ExpectedConan(ConanFile): | |
# Dependencies | ||
build_requires = ("Catch2/2.7.1@catchorg/stable") | ||
|
||
|
||
def configure_cmake(self): | ||
def package(self): | ||
cmake = CMake(self) | ||
|
||
cmake.definitions["EXPECTED_COMPILE_UNIT_TESTS"] = "ON" | ||
cmake.configure() | ||
return cmake | ||
|
||
|
||
def build(self): | ||
cmake = self.configure_cmake() | ||
# Compile and run the unit tests | ||
cmake.build() | ||
# cmake.test() | ||
cmake.build(target="test") | ||
|
||
|
||
def package(self): | ||
cmake = self.configure_cmake() | ||
cmake.install() | ||
|
||
self.copy(pattern="LICENSE", dst="licenses") | ||
|
||
|
||
def package_id(self): | ||
self.info.header_only() |