[trunk] add some sanity check in CMakeLists to prevent STRING(REGEX..) call issues

This commit is contained in:
Julien Malik 2011-11-09 14:23:03 +00:00
parent 815e2f3d03
commit ac946a4602
2 changed files with 13 additions and 7 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed ! : changed
+ : added + : added
November 9, 2011
+ [jmalik] add some sanity check in CMakeLists to prevent STRING(REGEX..) call issues
November 8, 2011 November 8, 2011
+ [mickael] WIP: add get_decoded_tile functionality + [mickael] WIP: add get_decoded_tile functionality
+ [mickael] WIP: clean and enhance j2K file + [mickael] WIP: clean and enhance j2K file

View File

@ -124,21 +124,24 @@ ENDIF(TEST_SUITE_FILES)
SET(IT_TEST_ENC 0) SET(IT_TEST_ENC 0)
SET(IT_TEST_DEC 0) SET(IT_TEST_DEC 0)
FOREACH(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST}) FOREACH(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
SET(IGNORE_LINE_FOUND 0) SET(IGNORE_LINE_FOUND 0)
# Replace space by ; to generate a list # Replace space by ; to generate a list
STRING(REPLACE " " ";" CMD_ARG_LIST ${OPJ_TEST_CMD_LINE}) STRING(REPLACE " " ";" CMD_ARG_LIST ${OPJ_TEST_CMD_LINE})
# Check if the first argument begin by the comment sign # Check if the first argument begin by the comment sign
LIST(GET CMD_ARG_LIST 0 EXE_NAME) LIST(GET CMD_ARG_LIST 0 EXE_NAME)
STRING(REGEX MATCH "^#" IGNORE_LINE_FOUND ${EXE_NAME})
IF(EXE_NAME)
IF(IGNORE_LINE_FOUND) STRING(REGEX MATCH "^#" IGNORE_LINE_FOUND ${EXE_NAME})
ENDIF(EXE_NAME)
IF(IGNORE_LINE_FOUND OR NOT EXE_NAME)
#MESSAGE( STATUS "Current line is ignored: ${OPJ_TEST_CMD_LINE}") #MESSAGE( STATUS "Current line is ignored: ${OPJ_TEST_CMD_LINE}")
ELSE(IGNORE_LINE_FOUND) ELSE(IGNORE_LINE_FOUND OR NOT EXE_NAME)
# Check if the first argument begin by the failed sign # Check if the first argument begin by the failed sign
SET(FAILED_TEST_FOUND 0) SET(FAILED_TEST_FOUND 0)
@ -330,7 +333,7 @@ FOREACH(OPJ_TEST_CMD_LINE ${OPJ_TEST_CMD_LINE_LIST})
ENDIF(ENC_TEST_FOUND) ENDIF(ENC_TEST_FOUND)
ENDIF(IGNORE_LINE_FOUND) ENDIF(IGNORE_LINE_FOUND OR NOT EXE_NAME)
ENDFOREACH(OPJ_TEST_CMD_LINE) ENDFOREACH(OPJ_TEST_CMD_LINE)