Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Tests / RunCMake / try_run / WorkingDirArg.cmake
1 include(${CMAKE_CURRENT_SOURCE_DIR}/${try_compile_DEFS})
2
3 try_run(RUN_RESULT COMPILE_RESULT ${try_compile_bindir_or_SOURCES}
4   ${CMAKE_CURRENT_SOURCE_DIR}/src.c
5   RUN_OUTPUT_VARIABLE RUN_OUTPUT
6   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp/workdir
7   )
8
9 if(RUN_RESULT)
10   message(SEND_ERROR "try run failed with result: ${RUN_RESULT}")
11 endif()