Use the Ninja cmake generator in the Jenkinsfile if ninja is found on the filesystem
This commit is contained in:
parent
57a01e6c32
commit
c422d4439a
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -2,7 +2,8 @@ def buildTarget(String path, String rpmArch = 'noarch', String debArch = 'noarch
|
|||||||
String packageArch = isPackageArchDeb ? debArch : rpmArch;
|
String packageArch = isPackageArchDeb ? debArch : rpmArch;
|
||||||
// Note: CMake 3.20 or higher is needed
|
// Note: CMake 3.20 or higher is needed
|
||||||
cmakeBuild buildDir: "cmake-build-${packageArch}${suffix}", buildType: 'release', cleanBuild: true, installation: 'Latest',
|
cmakeBuild buildDir: "cmake-build-${packageArch}${suffix}", buildType: 'release', cleanBuild: true, installation: 'Latest',
|
||||||
cmakeArgs: "--no-warn-unused-cli -DCMAKE_C_COMPILER=/usr/bin/${path}-gcc -DCMAKE_CXX_COMPILER=/usr/bin/${path}-g++ -DCMAKE_LINKER=/usr/bin/${path}-ld.gold -DCMAKE_AR=/usr/bin/${path}-ar -DCMAKE_RC_COMPILER=/usr/bin/${path}-windres -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch} -DCXX_TARGET=${packageArch} -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS=/usr/${path}/lib/ -DNO_CCACHE=ON"
|
cmakeArgs: "--no-warn-unused-cli -DCMAKE_C_COMPILER=/usr/bin/${path}-gcc -DCMAKE_CXX_COMPILER=/usr/bin/${path}-g++ -DCMAKE_LINKER=/usr/bin/${path}-ld.gold -DCMAKE_AR=/usr/bin/${path}-ar -DCMAKE_RC_COMPILER=/usr/bin/${path}-windres -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch} -DCXX_TARGET=${packageArch} -DCPACK_DEBIAN_PACKAGE_SHLIBDEPS_PRIVATE_DIRS=/usr/${path}/lib/ -DNO_CCACHE=ON",
|
||||||
|
generator: fileExists('/usr/bin/ninja') ? 'Ninja' : 'Unix Makefiles'
|
||||||
cmake arguments: "--build ./cmake-build-${packageArch}${suffix} --target ybcon", installation: 'Latest'
|
cmake arguments: "--build ./cmake-build-${packageArch}${suffix} --target ybcon", installation: 'Latest'
|
||||||
sh "/usr/bin/${path}-strip ./cmake-build-${packageArch}${suffix}/ybcon*"
|
sh "/usr/bin/${path}-strip ./cmake-build-${packageArch}${suffix}/ybcon*"
|
||||||
cpack installation: 'Latest', workingDir: "cmake-build-${packageArch}${suffix}"
|
cpack installation: 'Latest', workingDir: "cmake-build-${packageArch}${suffix}"
|
||||||
|
Loading…
Reference in New Issue
Block a user