https://github.com/Kitware/CMake
Raw File
Tip revision: 63d21c1f8efeb2f2337221119c479d75bbb0b7c0 authored by David Cole on 03 November 2010, 17:38:38 UTC
CMake 2.8.3
Tip revision: 63d21c1
CMakeLists.txt
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)
back to top