BUG: make test more robust
This commit is contained in:
parent
f0486827d5
commit
ff90b5efbf
|
@ -36,6 +36,7 @@ SET(DIR ${ExternalOBJ_BINARY_DIR}/Object)
|
|||
FILE(GLOB_RECURSE EXTERNAL_OBJECT
|
||||
"${DIR}/external_object*${CMAKE_CXX_OUTPUT_EXTENSION}")
|
||||
IF(EXTERNAL_OBJECT)
|
||||
LIST (GET EXTERNAL_OBJECT 0 EXTERNAL_OBJECT)
|
||||
MESSAGE("Found \"${EXTERNAL_OBJECT}\".")
|
||||
ELSE(EXTERNAL_OBJECT)
|
||||
MESSAGE(FATAL_ERROR "Could not find external object.")
|
||||
|
@ -44,8 +45,6 @@ ENDIF(EXTERNAL_OBJECT)
|
|||
# Test creation of external objects by custom commands.
|
||||
SET(CUSTOM_OBJECT
|
||||
${CMAKE_CURRENT_BINARY_DIR}/custom_object${CMAKE_C_OUTPUT_EXTENSION})
|
||||
MESSAGE("Debugging info: "
|
||||
"${CMAKE_COMMAND} -E copy ${EXTERNAL_OBJECT} ${CUSTOM_OBJECT}")
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CUSTOM_OBJECT}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${EXTERNAL_OBJECT} ${CUSTOM_OBJECT}
|
||||
|
|
Loading…
Reference in New Issue