diff options
Diffstat (limited to 'test/w3c/run_generated_test.cmake')
-rw-r--r-- | test/w3c/run_generated_test.cmake | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/test/w3c/run_generated_test.cmake b/test/w3c/run_generated_test.cmake index 3051306..868e111 100644 --- a/test/w3c/run_generated_test.cmake +++ b/test/w3c/run_generated_test.cmake @@ -22,35 +22,35 @@ if (${TARGETLANG} STREQUAL "vhdl") elseif (${TARGETLANG} STREQUAL "c") - # set(COMPILE_CMD_OBJ - # "-c" "${OUTDIR}/${TEST_FILE_NAME}.machine.c" - # "-o" "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" - # "-Ofast") - # - # message(STATUS "${GPP_BIN} ${COMPILE_CMD_OBJ}") - # execute_process( - # COMMAND time -p ${GPP_BIN} ${COMPILE_CMD_OBJ} - # WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) - # if(CMD_RESULT) - # message(FATAL_ERROR "Error running g++ ${GPP_BIN}: ${CMD_RESULT}") - # endif() - # file (SIZE "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" BINARY_SIZE) - # message("Size of compiled unit optimized for speed: ${BINARY_SIZE}") - # - # set(COMPILE_CMD_OBJ - # "-c" "${OUTDIR}/${TEST_FILE_NAME}.machine.c" - # "-o" "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" - # "-Os") - # - # message(STATUS "${GPP_BIN} ${COMPILE_CMD_OBJ}") - # execute_process( - # COMMAND time -p ${GPP_BIN} ${COMPILE_CMD_OBJ} - # WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) - # if(CMD_RESULT) - # message(FATAL_ERROR "Error running g++ ${GPP_BIN}: ${CMD_RESULT}") - # endif() - # file (SIZE "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" BINARY_SIZE) - # message("Size of compiled unit optimized for size: ${BINARY_SIZE}") + set(COMPILE_CMD_OBJ + "-c" "${OUTDIR}/${TEST_FILE_NAME}.machine.c" + "-o" "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" + "-Ofast" "-ansi" "-m16") + + message(STATUS "${CC_BIN} ${COMPILE_CMD_OBJ}") + execute_process( + COMMAND time -p ${CC_BIN} ${COMPILE_CMD_OBJ} + WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) + if(CMD_RESULT) + message(FATAL_ERROR "Error running gcc ${CC_BIN}: ${CMD_RESULT}") + endif() + file (SIZE "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" BINARY_SIZE) + message("Size of compiled unit optimized for speed: ${BINARY_SIZE}") + + set(COMPILE_CMD_OBJ + "-c" "${OUTDIR}/${TEST_FILE_NAME}.machine.c" + "-o" "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" + "-Os" "-ansi" "-m16") + + message(STATUS "${CC_BIN} ${COMPILE_CMD_OBJ}") + execute_process( + COMMAND time -p ${CC_BIN} ${COMPILE_CMD_OBJ} + WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) + if(CMD_RESULT) + message(FATAL_ERROR "Error running gcc ${CC_BIN}: ${CMD_RESULT}") + endif() + file (SIZE "${OUTDIR}/${TEST_FILE_NAME}.machine.c.o" BINARY_SIZE) + message("Size of compiled unit optimized for size: ${BINARY_SIZE}") set(COMPILE_CMD_BIN "-o" "${OUTDIR}/${TEST_FILE_NAME}" @@ -68,12 +68,12 @@ elseif (${TARGETLANG} STREQUAL "c") "-DAUTOINCLUDE_TEST=ON" "${SCAFFOLDING_FOR_GENERATED_C}") - message(STATUS "${GPP_BIN} ${COMPILE_CMD_BIN}") + message(STATUS "${CXX_BIN} ${COMPILE_CMD_BIN}") execute_process( - COMMAND time -p ${GPP_BIN} ${COMPILE_CMD_BIN} + COMMAND time -p ${CXX_BIN} ${COMPILE_CMD_BIN} WORKING_DIRECTORY ${OUTDIR} RESULT_VARIABLE CMD_RESULT) if(CMD_RESULT) - message(FATAL_ERROR "Error running g++ ${GPP_BIN}: ${CMD_RESULT}") + message(FATAL_ERROR "Error running g++ ${CXX_BIN}: ${CMD_RESULT}") endif() message(STATUS "time for transforming to binary") |