diff --git a/UpcomingReleaseNotes.md b/UpcomingReleaseNotes.md index 9eaf88e..3eda49a 100644 --- a/UpcomingReleaseNotes.md +++ b/UpcomingReleaseNotes.md @@ -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 diff --git a/src/main/kotlin/app/opendocument/ConanInstallTask.kt b/src/main/kotlin/app/opendocument/ConanInstallTask.kt index 1c0dc4a..ec6363a 100644 --- a/src/main/kotlin/app/opendocument/ConanInstallTask.kt +++ b/src/main/kotlin/app/opendocument/ConanInstallTask.kt @@ -37,11 +37,15 @@ abstract class ConanInstallTask : Exec() { @get:Input abstract val profile: Property + @get:Input + abstract val buildProfile: Property + @get:Input abstract val conanfile: Property init { profile.convention("default") + buildProfile.convention("default") conanfile.convention("conanfile.txt") } @@ -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() diff --git a/tests/no_default_profile_installed/lib/conanprofile.txt b/tests/no_default_profile_installed/lib/android-conanprofile.txt similarity index 100% rename from tests/no_default_profile_installed/lib/conanprofile.txt rename to tests/no_default_profile_installed/lib/android-conanprofile.txt diff --git a/tests/no_default_profile_installed/lib/build.gradle b/tests/no_default_profile_installed/lib/build.gradle index c2c32b6..365c51b 100644 --- a/tests/no_default_profile_installed/lib/build.gradle +++ b/tests/no_default_profile_installed/lib/build.gradle @@ -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") } } diff --git a/tests/no_default_profile_installed/lib/ubuntu-22.04-conanprofile.txt b/tests/no_default_profile_installed/lib/ubuntu-22.04-conanprofile.txt new file mode 100644 index 0000000..60b8cfe --- /dev/null +++ b/tests/no_default_profile_installed/lib/ubuntu-22.04-conanprofile.txt @@ -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'}