CMakeCompilerId.cmake (share/cmake-3.7/Modules) Fails when run in Jenkins build
I use git-bash bash shell when compiling cmake projects in windows. When I run cmake from bash shell it works fine, however when I run the same cmake with bash shell as jenkins job it fails. Log below.
I discovered that the length of data returned in the line file(READ ${file} peoffsethex LIMIT 1 OFFSET 60 HEX)
is shorted than expected, poffsethex from license file is empty.
When building regularly from shell, it appears that the license file is not even checked.
c:\jenkins_workspace\VT_R0>cd project_mw\verification_test
09:28:53
09:28:53 c:\jenkins_workspace\VT_R0\project_mw\verification_test>cmake . -G"Unix Makefiles" -DTARGET_CORE=0 -DTARGET_BUILD=ROM
09:28:53 -- Found metaware at C:/Users/Patrick.fitzpatrick/Metaware.2016.09/MetaWare/arc
09:28:54 READING OFFSET 60 from this FILE: C:/jenkins_workspace/VT_R0/project_mw/verification_test/CMakeFiles/3.7.2/CompilerIdC/.license_HCAC
09:28:54 CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeDetermineCompilerId.cmake:509 (string):
09:28:54 string begin index: 1 is out of range 0 - 0
09:28:54 Call Stack (most recent call first):
09:28:54 C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeDetermineCompilerId.cmake:36 (CMAKE_DETERMINE_COMPILER_ID_CHECK)
09:28:54 C:/Program Files/CMake/share/cmake-3.7/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID)
09:28:54 CMakeLists.txt:17 (project)
[.license_HCAC](/uploads/e4cec30ec2eb2fcde418bb3cb8300129/.license_HCAC)