diff options
Diffstat (limited to 'Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake')
-rw-r--r-- | Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake index 44dc8e4..606520c 100644 --- a/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake +++ b/Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake @@ -15,9 +15,10 @@ MACRO(TRY_COMPILE_FROM_SOURCE SOURCE VAR) ENDFOREACH(inc) SET(src "${src}\nint main() { ${SOURCE} ; return 0; }") - FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.c" + FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src2.c" "${src}") - + EXEC_PROGRAM("${CMAKE_COMMAND}" "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp" + ARGS -E copy src2.c src.c) MESSAGE(STATUS "Performing Test ${VAR}") TRY_COMPILE(${VAR} ${CMAKE_BINARY_DIR} |