2024-04-14 22:45:38 +02:00
|
|
|
enable_language(C)
|
2019-11-11 23:01:05 +01:00
|
|
|
set(CMAKE_CROSSCOMPILING 1)
|
|
|
|
|
|
|
|
# Executable: Return error code different from 0
|
2024-04-14 22:45:38 +02:00
|
|
|
add_executable(generated_exe_emulator_expected simple_src_exiterror.c)
|
|
|
|
get_property(emulator TARGET generated_exe_emulator_expected PROPERTY CROSSCOMPILING_EMULATOR)
|
|
|
|
set_property(TARGET generated_exe_emulator_expected PROPERTY CROSSCOMPILING_EMULATOR "$<1:${emulator}>")
|
2019-11-11 23:01:05 +01:00
|
|
|
|
|
|
|
add_custom_command(OUTPUT output
|
|
|
|
COMMAND generated_exe_emulator_expected
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/output
|
|
|
|
DEPENDS generated_exe_emulator_expected)
|
|
|
|
|
|
|
|
add_custom_target(ensure_build ALL
|
|
|
|
SOURCES
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/output
|
|
|
|
)
|