Fix the position of the cmakeArgs arguments in functions calls in the Jenkinsfile, and add a CXX_TARGET variable

This commit is contained in:
Username404 2021-08-15 16:43:35 +02:00
parent 9f25ef909b
commit 7fd3cc32c8
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 7 additions and 4 deletions

View File

@ -168,5 +168,8 @@ elseif(MINGW OR MSVC)
set(CPACK_GENERATOR ZIP;NSIS)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ybcon.exe DESTINATION bin)
endif()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
if (NOT DEFINED CXX_TARGET)
set(CXX_TARGET ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-${CXX_TARGET}")
include(CPack)

6
Jenkinsfile vendored
View File

@ -1,7 +1,7 @@
def buildTarget(String path, String rpmArch, String debArch) {
cmakeBuild buildDir: "cmake-build-${debArch}", buildType: 'release', cleanBuild: true, installation: 'Main'
cmake arguments: "--build ./cmake-build-${debArch} --target ybcon", installation: 'Main',
cmakeArgs: "-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 -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch}"
cmakeBuild buildDir: "cmake-build-${debArch}", buildType: 'release', cleanBuild: true, installation: 'Main',
cmakeArgs: "-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 -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch} -DCXX_TARGET=${debArch}"
cmake arguments: "--build ./cmake-build-${debArch} --target ybcon", installation: 'Main'
cpack installation: 'Main', workingDir: "cmake-build-${debArch}"
}