Skip to content
Snippets Groups Projects
Commit 7e24ce68 authored by Patrick MADELA's avatar Patrick MADELA
Browse files

Add conan test package

parent 0c1807f1
No related branches found
No related tags found
1 merge request!2HDF5 1.14.3
...@@ -7,6 +7,7 @@ pom_win.xml ...@@ -7,6 +7,7 @@ pom_win.xml
pom_dev_win.xml pom_dev_win.xml
test/datastreamer/pom_dev.xml test/datastreamer/pom_dev.xml
CMakeFiles CMakeFiles
test_package build
CMakeUserPresets.json
**/target/ **/target/
cmake_minimum_required(VERSION 3.15)
project(PackageTest CXX)
find_package(nexuscpp CONFIG REQUIRED)
add_executable(test_package src/test_package.cpp)
target_link_libraries(test_package ${nexuscpp_LIBRARIES})
import os
from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.build import can_run
class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps", "CMakeToolchain"
def requirements(self):
self.requires(self.tested_reference_str)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def layout(self):
cmake_layout(self)
def test(self):
cmd = os.path.join(self.cpp.build.bindir, "test_package")
self.run(cmd, env="conanrun")
#include <iostream>
#include <nexuscpp/nexuscpp.h>
int main(int argc, char* argv[]) {
std::cout << nxcpp::get_version() << std::endl;
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment