summaryrefslogtreecommitdiffstats
path: root/Tests/CrossCompile
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-11-09 16:14:21 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-11-09 16:14:21 (GMT)
commitef84e81011c66edfcc5223af0eff2790004d5689 (patch)
treed1fd38c454d2d851ee12b1f11f85b8581a4afe08 /Tests/CrossCompile
parent70dbbcc54278ef4f618ab316c67dcae0903fd6e2 (diff)
downloadCMake-ef84e81011c66edfcc5223af0eff2790004d5689.zip
CMake-ef84e81011c66edfcc5223af0eff2790004d5689.tar.gz
CMake-ef84e81011c66edfcc5223af0eff2790004d5689.tar.bz2
Added test coverage for TRY_RUN in cross compile mode.
Diffstat (limited to 'Tests/CrossCompile')
-rw-r--r--Tests/CrossCompile/CMakeLists.txt12
-rw-r--r--Tests/CrossCompile/main.c4
2 files changed, 16 insertions, 0 deletions
diff --git a/Tests/CrossCompile/CMakeLists.txt b/Tests/CrossCompile/CMakeLists.txt
new file mode 100644
index 0000000..9ef7a87
--- /dev/null
+++ b/Tests/CrossCompile/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_minimum_required (VERSION 2.6)
+PROJECT(CrossCompile)
+
+#Simulate the cross compile condition
+SET(CMAKE_SYSTEM_NAME "systemName")
+SET(CMAKE_CROSSCOMPILING ON)
+
+ADD_EXECUTABLE(CrossCompile main.c)
+
+TRY_RUN(run_result compile_result
+ ${CrossCompile_BINARY_DIR}
+ ${CrossCompile_SOURCE_DIR}/main.c)
diff --git a/Tests/CrossCompile/main.c b/Tests/CrossCompile/main.c
new file mode 100644
index 0000000..8488f4e
--- /dev/null
+++ b/Tests/CrossCompile/main.c
@@ -0,0 +1,4 @@
+int main(void)
+{
+ return 0;
+}