From 811073c2b15dc864b5b5ea69d04e48d21cb3ede9 Mon Sep 17 00:00:00 2001 From: davidjsherman Date: Wed, 3 Jan 2018 02:26:55 +0100 Subject: [PATCH] Add workDir in front of sourceDir only if it isn't there already --- vars/CMake.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/CMake.groovy b/vars/CMake.groovy index d4d00f5..033832f 100644 --- a/vars/CMake.groovy +++ b/vars/CMake.groovy @@ -10,7 +10,7 @@ def call(body) { // Standardize directory layout def buildDir = (body.buildDir ?: workDir + '/build' + (body.label ? '/' + body.label : '')) - def sourceDir = (body.sourceDir ? workDir + '/' + body.sourceDir : workDir) + def sourceDir = (body.sourceDir ? ((body.sourceDir.indexOf(workDir) == 0 ? '' : workDir + '/') + body.sourceDir) : workDir) def installDir = (body.installDir ?: workDir + '/dist' + (body.label ? '/'+body.label : '')) // Default values