mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-20 06:00:30 -06:00
Tests: Teach pseudo_emulator helper to pass by default
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
set(CMAKE_CROSSCOMPILING 1)
|
||||
|
||||
set(ENV{PSEUDO_EMULATOR_FAIL} 1)
|
||||
|
||||
try_run(run_result compile_result
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/simple_src_exiterror.cxx
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int ii;
|
||||
const char* fail = getenv("PSEUDO_EMULATOR_FAIL");
|
||||
|
||||
printf("Command:");
|
||||
for (ii = 1; ii < argc; ++ii) {
|
||||
@@ -10,5 +16,9 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
return 42;
|
||||
if (fail && *fail) {
|
||||
return 42;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user