Skip to content

Commit 2f5a2c3

Browse files
Add support for specifying conan build profile
1 parent 7d81cdf commit 2f5a2c3

5 files changed

Lines changed: 20 additions & 2 deletions

File tree

UpcomingReleaseNotes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Add support for both cmake_layout and non cmake_layout when generating toolchain file.
1+
Added support for both cmake_layout and non cmake_layout when generating toolchain file.
2+
Added support for specifying conan build profile

src/main/kotlin/app/opendocument/ConanInstallTask.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ abstract class ConanInstallTask : Exec() {
3737
@get:Input
3838
abstract val profile: Property<String>
3939

40+
@get:Input
41+
abstract val buildProfile: Property<String>
42+
4043
@get:Input
4144
abstract val conanfile: Property<String>
4245

4346
init {
4447
profile.convention("default")
48+
buildProfile.convention("default")
4549
conanfile.convention("conanfile.txt")
4650
}
4751

@@ -58,6 +62,7 @@ abstract class ConanInstallTask : Exec() {
5862
"--output-folder=" + outputDirectory.get(),
5963
"--build=missing",
6064
"--profile:host=" + profile.get(),
65+
"--profile:build=" + buildProfile.get(),
6166
"--settings:host", "arch=" + arch.get(),
6267
)
6368
super.exec()

tests/no_default_profile_installed/lib/conanprofile.txt renamed to tests/no_default_profile_installed/lib/android-conanprofile.txt

File renamed without changes.

tests/no_default_profile_installed/lib/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tasks.named("clean") {
3434

3535
["armv7", "armv8", "x86", "x86_64"].each { arch ->
3636
tasks.named("conanInstall-" + arch) {
37-
profile.set("conanprofile.txt")
37+
profile.set("android-conanprofile.txt")
38+
buildProfile.set("ubuntu-22.04-conanprofile.txt")
3839
}
3940
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[settings]
2+
os=Linux
3+
arch=x86_64
4+
build_type=RelWithDebInfo
5+
compiler=clang
6+
compiler.version=15
7+
compiler.cppstd=20
8+
compiler.libcxx=libstdc++11
9+
10+
[conf]
11+
tools.build:compiler_executables={'c': 'clang-15', 'cpp': 'clang++-15'}

0 commit comments

Comments
 (0)