cereal/unittests/run_portability_test.cmake
Tushar Maheshwari df44243bad Enable cross-platform portability test
CMake fix 32-bit executable with generator Win64
2017-01-26 14:16:28 +05:30

17 lines
579 B
CMake

macro(EXEC_CMD_CHECK)
message("running ${ARGN}")
execute_process(COMMAND ${ARGN} RESULT_VARIABLE CMD_RESULT)
if(CMD_RESULT)
message(FATAL_ERROR "Error running ${ARGN}")
endif()
endmacro()
set(PORTABILITY_TEST_32 "${PORTABILITY_TEST_DIR}/portability_test32")
set(PORTABILITY_TEST_64 "${PORTABILITY_TEST_DIR}/portability_test64")
exec_cmd_check(${PORTABILITY_TEST_64} save 64)
exec_cmd_check(${PORTABILITY_TEST_32} load 32)
exec_cmd_check(${PORTABILITY_TEST_32} save 32)
exec_cmd_check(${PORTABILITY_TEST_64} load 64)
exec_cmd_check(${PORTABILITY_TEST_64} remove 64)