2009-11-09 19:14:21 +03:00
|
|
|
cmake_minimum_required (VERSION 2.6)
|
|
|
|
PROJECT(CrossCompile)
|
|
|
|
|
2009-11-09 20:05:49 +03:00
|
|
|
UNSET(run_result CACHE)
|
|
|
|
|
2009-11-09 19:14:21 +03:00
|
|
|
#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)
|