Skip to content

Commit

Permalink
🔧 Add .conan packaging data
Browse files Browse the repository at this point in the history
This adds a `conan` directory with package information used for
producing and testing a conan package.
  • Loading branch information
bitwizeshift committed Nov 29, 2020
1 parent e58c5bc commit 9066c02
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .conan/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.8)

project(Expected.ConanTestPackage)

include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
conan_set_find_paths()

find_package(Expected REQUIRED)

set(source_files
src/main.cpp
)

add_executable(${PROJECT_NAME}
${source_files}
)
target_link_libraries(${PROJECT_NAME}
PRIVATE Expected::Expected
)
17 changes: 17 additions & 0 deletions .conan/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python
from conans import ConanFile, CMake

class ExpectedConanTest(ConanFile):
settings = "os", "compiler", "arch", "build_type"
generators = "cmake"

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def imports(self):
pass

def test(self):
pass
12 changes: 12 additions & 0 deletions .conan/test_package/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "expected.hpp"
#include <iostream>

auto get_return_value() noexcept -> expect::expected<int>
{
return 0;
}

int main()
{
return get_return_value().value();
}

0 comments on commit 9066c02

Please sign in to comment.