Debian Codegraph @

Tests/GhsMulti/GhsMultiMultipleProjects/verify.cmake

raw
1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 # file LICENSE.rst or https://cmake.org/licensing for details.
3
4 function(verify_project_top name)
5 unset(fileName CACHE)
6 find_file (fileName ${name}.top.gpj
7 ${CMAKE_CURRENT_BINARY_DIR}
8 ${CMAKE_CURRENT_BINARY_DIR}/sub
9 ${CMAKE_CURRENT_BINARY_DIR}/examples
10 )
11
12 if (fileName)
13 message("Found target ${name}: ${fileName}")
14 else()
15 message(SEND_ERROR "Could not find project ${name}: ${fileName}")
16 endif()
17 endfunction()
18
19 function(verify_exe_built name)
20 unset(fileName CACHE)
21 find_file (fileName ${name}
22 ${CMAKE_CURRENT_BINARY_DIR}
23 ${CMAKE_CURRENT_BINARY_DIR}/sub
24 )
25
26 if (fileName)
27 message("Found target ${name}: ${fileName}")
28 else()
29 message(SEND_ERROR "Could not find project ${name}: ${fileName}")
30 endif()
31 endfunction()
32
33 #test project top files were generated
34 verify_project_top(test)
35 verify_project_top(test2)
36 verify_project_top(test3)
37 verify_exe_built(exe1)
38 verify_exe_built(exe2)