summaryrefslogtreecommitdiffstats
path: root/Tests/CrossCompile/CMakeLists.txt
blob: 121cb815e1d81e952810bbfec1fbc41ce688b6c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
cmake_minimum_required (VERSION 2.6)
project(CrossCompile)

unset(run_result CACHE)

#Simulate the cross compile condition
set(CMAKE_CROSSCOMPILING ON)

add_executable(CrossCompile main.c)

try_run(run_result compile_result
    ${CrossCompile_BINARY_DIR}
    ${CrossCompile_SOURCE_DIR}/main.c)