forked from deltixlab/DFP
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cxx: Initial version of the DFP with the Conan Package Manager support.
- Loading branch information
1 parent
ab71ecd
commit d383933
Showing
4 changed files
with
42 additions
and
36 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
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
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,20 +1,26 @@ | ||
import os | ||
|
||
from conan import ConanFile | ||
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps | ||
from conan.tools.build import cross_building | ||
from conan.tools.cmake import CMake, cmake_layout | ||
from conan.tools.build import can_run | ||
|
||
|
||
class TestExampleConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake", "cmake_find_package" | ||
generators = "CMakeDeps", "CMakeToolchain" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def build_requirements(self): | ||
self.tool_requires("dfp/[>=1.0.2]") | ||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def test(self): | ||
if not cross_building(self): | ||
self.run("./test_package_example") | ||
if can_run(self): | ||
cmd = os.path.join(self.cpp.build.bindir, "demo") | ||
self.run(cmd, env="conanrun") |
6 changes: 3 additions & 3 deletions
6
native/test_package/demo.cpp → native/test_package/src/demo.cpp
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