From 4fc60b06aa4a366943636f38ed122f291007db8e Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 13 Mar 2017 14:18:45 +0100 Subject: [PATCH] Cross compiling is hell. --- CMakeLists.txt | 2 +- src/sourcery.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dae7a42c..a2905ae4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -363,7 +363,7 @@ else() try_run(RUNA RUNB ${BINARY_DIR}/CMakeTmp ${SOURCE_DIR}/src/sourcery.cpp ) endif() -if("${RUNA}" EQUAL "2") +if("${RUNA}" EQUAL "42") message("Not cross compiling - building sourcery") add_executable(sourcery src/sourcery.cpp diff --git a/src/sourcery.cpp b/src/sourcery.cpp index 1e54343d..4cf00b8c 100644 --- a/src/sourcery.cpp +++ b/src/sourcery.cpp @@ -8,7 +8,7 @@ int main(int argc, char* argv[]){ if (argc < 4) { std::cerr << "Usage: " << argv[0] << " " << std::endl; - return 2; + return 42; } std::ofstream tmp(argv[3]); //begin the first line