branch | transitional_engine |
changeset 16021 | 6a3dc15b78b9 |
16009:7544a7d7c819 | 16021:6a3dc15b78b9 |
---|---|
1 # CMake script to test if a file exists. Errors if the file does not exist. |
|
2 # Expect actual arguments to start at index 3 (cmake -P <script_name>) |
|
3 |
|
4 # Expect one argument |
|
5 if(NOT (CMAKE_ARGC EQUAL "4")) |
|
6 message(FATAL_ERROR "Test Internal Error: Unexpected ARGC Value: ${CMAKE_ARGC}.") |
|
7 endif() |
|
8 |
|
9 set(FILE_PATH "${CMAKE_ARGV3}") |
|
10 |
|
11 if(NOT ( EXISTS "${FILE_PATH}" )) |
|
12 message(FATAL_ERROR "Test failed: File `${FILE_PATH}` does not exist.") |
|
13 endif() |