Fix travis build with make 2.8.7
authormayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 03:44:52 +0000 (05:44 +0200)
committermayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 03:44:52 +0000 (05:44 +0200)
tools/ctest_scripts/travis-ci.cmake
tools/travis-ci/run.sh

index 841d926c3455713eabb2a4660b1118174a97208f..8d5b9239256bf5703cb76428d74d25e3ea190200 100644 (file)
@@ -6,10 +6,27 @@
 
 cmake_minimum_required(VERSION 2.8)
 
-set(ENV{LANG} en_US.UTF-8)
+set( ENV{LANG} en_US.UTF-8)
 set( CTEST_DASHBOARD_ROOT  "$ENV{PWD}/build" )
 set( CTEST_CMAKE_GENERATOR "Unix Makefiles")   # Always makefile in travis-ci environment
-set( BUILD_PLATFORM "x86_64" )
+
+if ("$ENV{OPJ_BUILD_CONFIGURATION}" STREQUAL "")
+  set( CTEST_BUILD_CONFIGURATION "Release")
+else()
+       set( CTEST_BUILD_CONFIGURATION "$ENV{OPJ_BUILD_CONFIGURATION}")
+endif()
+
+if ("$ENV{OPJ_SITE}" STREQUAL "")
+  set( CTEST_SITE "Unknown")
+else()
+       set( CTEST_SITE "$ENV{OPJ_SITE}")
+endif()
+
+if ("$ENV{OPJ_BUILDNAME}" STREQUAL "")
+  set( CTEST_BUILD_NAME "Unknown-${CTEST_BUILD_CONFIGURATION}")
+else()
+       set( CTEST_BUILD_NAME "$ENV{OPJ_BUILDNAME}")
+endif()
 
 # To execute part of the encoding test suite, kakadu binaries are needed to decode encoded image and compare 
 # it to the baseline. Kakadu binaries are freely available for non-commercial purposes 
index 58b86c1a16b56b9639576f71e583c251eeadc94b..75c01dc9c2ada23694680e1bba48e9a83761f129 100755 (executable)
@@ -84,7 +84,10 @@ fi
 
 set -x
 # This will print configuration
-export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT}
+export OPJ_SITE=${OPJ_SITE}
+export OPJ_BUILDNAME=${OPJ_BUILDNAME}
 export OPJ_SOURCE_DIR=${OPJ_SOURCE_DIR}
+export OPJ_BUILD_CONFIGURATION=${OPJ_BUILD_CONFIGURATION}
+export OPJ_DO_SUBMIT=${OPJ_DO_SUBMIT}
 
-ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V -D CTEST_BUILD_NAME:STRING=${OPJ_BUILDNAME} -D CTEST_SITE:STRING=${OPJ_SITE} -D CTEST_BUILD_CONFIGURATION:STRING=${OPJ_BUILD_CONFIGURATION}
+ctest -S ${OPJ_SOURCE_DIR}/tools/ctest_scripts/travis-ci.cmake -V