-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conan v2 #14
Merged
Merged
Conan v2 #14
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e8b01e8
Conan 2 migration attempt
f7da8b8
Update build command and linux build matrix. Temporary experiment wit…
b678af3
Detect default conan profile
fab3608
Try g++-11 as 8 has been discontinued from ubuntu-22.04 and later
663da5d
Update conan upload command
7ab93a1
Use self.settings.build_type instead of hardcoded Debug/Release
95929da
Update after review
kyllingstad a2051b0
Use an official Conan Docker image to build on CI
kyllingstad 171d648
Don't use user/channel names for the Conan package
kyllingstad f95626e
Let the Docker container mess with the host filesystem
kyllingstad 9f74fd5
Docker CI: Make bind mount explicity writable
kyllingstad 1ce507f
In CI, build from a copy of the source tree
kyllingstad 087c472
Don't try to use /root, we're not root in CI
kyllingstad 6057d49
Link test project to libdl
kyllingstad 4b13199
Reinstate environment variables on Windows CI
kyllingstad 7d16be8
Force uploads from CI
kyllingstad d196694
Fix conan create command in Linux CI
kyllingstad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,8 +1,7 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(PackageTest CXX) | ||
cmake_minimum_required(VERSION 2.8.12) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup() | ||
find_package(fmilibrary CONFIG REQUIRED) | ||
|
||
add_executable(test test.cpp) | ||
target_link_libraries(test ${CONAN_LIBS} ${CMAKE_DL_LIBS}) | ||
target_link_libraries(test fmilibrary::fmilibrary ${CMAKE_DL_LIBS}) |
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,25 +1,27 @@ | ||
import os | ||
|
||
from conans import ConanFile, CMake, tools | ||
from conan import ConanFile | ||
from conan.tools.cmake import CMake, cmake_layout | ||
from conan.tools.files import copy | ||
from conan.tools.build import can_run | ||
|
||
|
||
class FmilibraryTestConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake" | ||
generators = "CMakeDeps", "CMakeToolchain" | ||
|
||
def requirements(self): | ||
self.requires(self.tested_reference_str) | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
# Current dir is "test_package/build/<build_id>" and CMakeLists.txt is | ||
# in "test_package" | ||
cmake.configure() | ||
cmake.build() | ||
|
||
def imports(self): | ||
self.copy("*.dll", dst="bin", src="bin") | ||
self.copy("*.dylib*", dst="bin", src="lib") | ||
self.copy('*.so*', dst='bin', src='lib') | ||
|
||
def layout(self): | ||
cmake_layout(self) | ||
|
||
def test(self): | ||
if not tools.cross_building(self.settings): | ||
os.chdir("bin") | ||
self.run(".%stest" % os.sep) | ||
if can_run(self): | ||
cmd = os.path.join(self.cpp.build.bindir, "test") | ||
self.run(cmd, env="conanrun") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding
tc.variables["FMILIB_GENERATE_DOXYGEN_DOC"] = False
to always avoid building and installing documentation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.