mirror of https://github.com/CGAL/cgal
CERR: create the file before using it
This commit is contained in:
parent
e9c80ba3f5
commit
39c913a090
|
|
@ -15,11 +15,16 @@ if(NOT CERR)
|
|||
"The variable `CERR` should be defined to the output error file!")
|
||||
endif()
|
||||
|
||||
# Create the file before using it
|
||||
file(WRITE ${CERR})
|
||||
|
||||
# Execute the command ${CMD} with stderr redirected to the file ${CERR}
|
||||
execute_process(
|
||||
COMMAND ${CMD}
|
||||
ERROR_FILE "${CERR}"
|
||||
OUTPUT_VARIABLE output
|
||||
RESULT_VARIABLE error_result)
|
||||
|
||||
if(error_result)
|
||||
if(CMD2)
|
||||
file(REMOVE ${CERR})
|
||||
|
|
|
|||
Loading…
Reference in New Issue