Commit 3654e5ed authored by Joseph Noir's avatar Joseph Noir

Use env instead of cmake arg

parent 7a6486e3
...@@ -70,7 +70,7 @@ pipeline { ...@@ -70,7 +70,7 @@ pipeline {
} }
stage ('GCC on Mac') { stage ('GCC on Mac') {
agent { label 'macOS && gcc' } agent { label 'macOS && gcc' }
steps { unixBuild('Debug', '-DCMAKE_CXX_COMPILER=g++') } steps { unixBuild('Debug') }
} }
stage ('FreeBSD') { stage ('FreeBSD') {
agent { label 'FreeBSD' } agent { label 'FreeBSD' }
...@@ -148,27 +148,29 @@ def unixBuild(buildType = 'Debug', ...@@ -148,27 +148,29 @@ def unixBuild(buildType = 'Debug',
generator = 'Unix Makefiles', generator = 'Unix Makefiles',
cleanBuild = true) { cleanBuild = true) {
echo "building on $NODE_NAME" echo "building on $NODE_NAME"
deleteDir() withEnv(["label_exp="+STAGE_NAME.toLowerCase()]) {
unstash('caf-sources') deleteDir()
dir('caf-sources') { unstash('caf-sources')
// Configure and build. dir('caf-sources') {
cmakeBuild([ // Configure and build.
buildDir: 'build', cmakeBuild([
buildType: "$buildType", buildDir: 'build',
cleanBuild: cleanBuild, buildType: "$buildType",
cmakeArgs: "$unixOpts $buildOpts", cleanBuild: cleanBuild,
generator: "$generator", cmakeArgs: "$unixOpts $buildOpts",
installation: 'cmake in search path', generator: "$generator",
preloadScript: '../cmake/jenkins.cmake', installation: 'cmake in search path',
sourceDir: '.', preloadScript: '../cmake/jenkins.cmake',
steps: [[args: 'all']], sourceDir: '.',
]) steps: [[args: 'all']],
// Test. ])
ctest([ // Test.
arguments: '--output-on-failure', ctest([
installation: 'cmake in search path', arguments: '--output-on-failure',
workingDir: 'build', installation: 'cmake in search path',
]) workingDir: 'build',
])
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment