Added test coverage for TRY_RUN in cross compile mode.
This commit is contained in:
parent
70dbbcc542
commit
ef84e81011
|
@ -134,6 +134,7 @@ IF(BUILD_TESTING)
|
|||
ADD_TEST_MACRO(ExportImport ExportImport)
|
||||
ADD_TEST_MACRO(Unset Unset)
|
||||
ADD_TEST_MACRO(PolicyScope PolicyScope)
|
||||
ADD_TEST_MACRO(CrossCompile CrossCompile)
|
||||
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Make")
|
||||
ADD_TEST_MACRO(Policy0002 Policy0002)
|
||||
ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "Make")
|
||||
|
|
|
@ -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)
|
|
@ -0,0 +1,4 @@
|
|||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue