Fix TRY_RUN cross compile test to pass consistently
This commit is contained in:
parent
ef84e81011
commit
8658fcbe24
|
@ -135,6 +135,8 @@ IF(BUILD_TESTING)
|
||||||
ADD_TEST_MACRO(Unset Unset)
|
ADD_TEST_MACRO(Unset Unset)
|
||||||
ADD_TEST_MACRO(PolicyScope PolicyScope)
|
ADD_TEST_MACRO(PolicyScope PolicyScope)
|
||||||
ADD_TEST_MACRO(CrossCompile CrossCompile)
|
ADD_TEST_MACRO(CrossCompile CrossCompile)
|
||||||
|
SET_TESTS_PROPERTIES(CrossCompile PROPERTIES
|
||||||
|
PASS_REGULAR_EXPRESSION "TRY_RUN.. invoked in cross-compiling mode")
|
||||||
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Make")
|
IF("${CMAKE_TEST_GENERATOR}" MATCHES "Make")
|
||||||
ADD_TEST_MACRO(Policy0002 Policy0002)
|
ADD_TEST_MACRO(Policy0002 Policy0002)
|
||||||
ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "Make")
|
ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "Make")
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
PROJECT(CrossCompile)
|
PROJECT(CrossCompile)
|
||||||
|
|
||||||
|
UNSET(run_result CACHE)
|
||||||
|
|
||||||
#Simulate the cross compile condition
|
#Simulate the cross compile condition
|
||||||
SET(CMAKE_SYSTEM_NAME "systemName")
|
|
||||||
SET(CMAKE_CROSSCOMPILING ON)
|
SET(CMAKE_CROSSCOMPILING ON)
|
||||||
|
|
||||||
ADD_EXECUTABLE(CrossCompile main.c)
|
ADD_EXECUTABLE(CrossCompile main.c)
|
||||||
|
|
Loading…
Reference in New Issue