summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/TransformDepfile/RunCMakeTest.cmake
blob: 9a38b957f5850798836b2f8d756d565fbeb7f753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
include(RunCMake)

function(run_transform_depfile name)
  set(RunCMake-check-file gccdepfile.cmake)
  run_cmake_command(${name}-gcc
    ${CMAKE_COMMAND} -E cmake_transform_depfile "${RunCMake_GENERATOR}" gccdepfile "${RunCMake_SOURCE_DIR}" "${RunCMake_SOURCE_DIR}/subdir" "${RunCMake_BINARY_DIR}" "${RunCMake_BINARY_DIR}/subdir" "${CMAKE_CURRENT_LIST_DIR}/${name}.d" out.d
    )
  set(RunCMake-check-file vstlog.cmake)
  run_cmake_command(${name}-tlog
    ${CMAKE_COMMAND} -E cmake_transform_depfile "${RunCMake_GENERATOR}" vstlog "${RunCMake_SOURCE_DIR}" "${RunCMake_SOURCE_DIR}/subdir" "${RunCMake_BINARY_DIR}" "${RunCMake_BINARY_DIR}/subdir" "${CMAKE_CURRENT_LIST_DIR}/${name}.d" out.tlog
    )
endfunction()

if(WIN32)
  run_transform_depfile(deps-windows)
else()
  run_transform_depfile(deps-unix)
endif()
run_transform_depfile(noexist)
run_transform_depfile(empty)
run_transform_depfile(invalid)