endif()
endif()
-IF(CMAKE_CROSSCOMPILING)
- IF(WIN32)
- set(windows_context "yes")
- set(IS_WINDOWS 1)
- ENDIF()
-ELSE()
+IF(NOT CMAKE_CROSSCOMPILING)
file(REMOVE "${CMAKE_BINARY_DIR}/testprog*")
file(REMOVE ${CMAKE_BINARY_DIR}/conftestval)
set(MCSC_buildcmd ${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_AC_CHECK_MCSC.c ${mcsc_flags} -o testprog)
message(STATUS "mcsc: ${mcsc}")
ENDIF()
-if(mcsc MATCHES "no" AND pthread)
- if(HAVE_WINDOWS_H)
- set(windows_context "yes")
- set(IS_WINDOWS 1)
- elseif(HAVE_WINDOWS_H)
- message(FATAL_ERROR "no appropriate backend found")
- endif()
-endif()
-
#Only windows
if(WIN32)
endif()
endif()
-if(windows_context MATCHES "yes")
- message(STATUS "Context change to windows")
-endif()
-
#If can have both context
if(mcsc)
#AC_PROG_MAKE_SET
-if(CMAKE_CROSSCOMPILING)
- set(RUN_PRINTF_NULL_VAR "cross")
- set(COMPILE_PRINTF_NULL_VAR "cross")
-else()
- #AC_PRINTF_NULL FIXME: this is too ancient to survive!
- try_run(RUN_PRINTF_NULL_VAR COMPILE_PRINTF_NULL_VAR
- ${CMAKE_BINARY_DIR}
- ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_printf_null.c
- )
-endif()
-
-if(RUN_PRINTF_NULL_VAR MATCHES "FAILED_TO_RUN")
- SET(PRINTF_NULL_WORKING "0")
-else()
- SET(PRINTF_NULL_WORKING "1")
-endif()
-
#AC_CHECK_VA_COPY
set(diff_va "va_copy((d),(s))"