Skip to content

Commit

Permalink
Add support for specifying conan build profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Aug 8, 2024
1 parent 7d81cdf commit 2f5a2c3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion UpcomingReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Add support for both cmake_layout and non cmake_layout when generating toolchain file.
Added support for both cmake_layout and non cmake_layout when generating toolchain file.
Added support for specifying conan build profile
5 changes: 5 additions & 0 deletions src/main/kotlin/app/opendocument/ConanInstallTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,15 @@ abstract class ConanInstallTask : Exec() {
@get:Input
abstract val profile: Property<String>

@get:Input
abstract val buildProfile: Property<String>

@get:Input
abstract val conanfile: Property<String>

init {
profile.convention("default")
buildProfile.convention("default")
conanfile.convention("conanfile.txt")
}

Expand All @@ -58,6 +62,7 @@ abstract class ConanInstallTask : Exec() {
"--output-folder=" + outputDirectory.get(),
"--build=missing",
"--profile:host=" + profile.get(),
"--profile:build=" + buildProfile.get(),
"--settings:host", "arch=" + arch.get(),
)
super.exec()
Expand Down
3 changes: 2 additions & 1 deletion tests/no_default_profile_installed/lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ tasks.named("clean") {

["armv7", "armv8", "x86", "x86_64"].each { arch ->
tasks.named("conanInstall-" + arch) {
profile.set("conanprofile.txt")
profile.set("android-conanprofile.txt")
buildProfile.set("ubuntu-22.04-conanprofile.txt")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[settings]
os=Linux
arch=x86_64
build_type=RelWithDebInfo
compiler=clang
compiler.version=15
compiler.cppstd=20
compiler.libcxx=libstdc++11

[conf]
tools.build:compiler_executables={'c': 'clang-15', 'cpp': 'clang++-15'}

0 comments on commit 2f5a2c3

Please sign in to comment.