file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/foo.cmake" "set(FOO 1)\n")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/script.cmake" "set(CMAKE_MODULE_PATH \"${YCM_SOURCE_DIR}/modules\")
include(IncludeUrl)
unset(FOO)
include_url(\"file://${CMAKE_CURRENT_BINARY_DIR}/foo.cmake\" DOWNLOAD_ALWAYS)
if(NOT FOO)
  message(FATAL_ERROR \"include_url: failed\")
endif()
")
execute_process(COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/script.cmake"
                RESULT_VARIABLE _res)
if(_res)
  message(FATAL_ERROR "include_url: ERROR (script returned an error)")
endif()
