Fix the Jenkinsfile and remove the useless CMake 3.22.0 warning

This commit is contained in:
Username404 2021-12-03 16:14:23 +01:00
parent b467a804ca
commit 48fe02c171
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 2 additions and 4 deletions

View File

@ -46,9 +46,6 @@ endif()
if (${IS_GNU} OR ${IS_CLANG}) if (${IS_GNU} OR ${IS_CLANG})
if (NOT MINGW) if (NOT MINGW)
if (CMAKE_VERSION STREQUAL "3.22.0")
message(WARNING "CMake ${CMAKE_VERSION} does not support mingw cross-compilers")
endif()
include(FindOpenMP) include(FindOpenMP)
if (OpenMP_CXX_FOUND) if (OpenMP_CXX_FOUND)
set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")

3
Jenkinsfile vendored
View File

@ -1,8 +1,9 @@
def buildTarget(String path, String rpmArch = 'noarch', String debArch = 'noarch', boolean isPackageArchDeb = true, String suffix = '') { def buildTarget(String path, String rpmArch = 'noarch', String debArch = 'noarch', boolean isPackageArchDeb = true, String suffix = '') {
final String packageArch = isPackageArchDeb ? debArch : rpmArch; final String packageArch = isPackageArchDeb ? debArch : rpmArch;
final String system_name = !path.contains('mingw') ? sh(returnStdout: true, script: 'uname -s').trim() : 'Windows'
// 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_SYSTEM_NAME=\"${system_name}\" -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' 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 -s ./cmake-build-${packageArch}${suffix}/ybcon*" sh "/usr/bin/${path}-strip -s ./cmake-build-${packageArch}${suffix}/ybcon*"