CMake/Tests/RunCMake/ObjectLibrary/check_object_files.cmake
Robert Maynard ce078dda79 Relax the usage of TARGET_OBJECTS generator expression
The geneator expression can now be used with static, shared, and
module libraries and executables.
2019-04-19 13:52:50 -04:00

18 lines
398 B
CMake

if (NOT TARGET_OBJECTS)
message(SEND_ERROR "Object not passed as -DTARGET_OBJECTS")
endif()
foreach(objlib_file IN LISTS objects)
message(STATUS "objlib_file: =${objlib_file}=")
set(file_exists False)
if (EXISTS "${objlib_file}")
set(file_exists True)
endif()
if (NOT file_exists)
message(SEND_ERROR "File \"${objlib_file}\" does not exist!${tried}")
endif()
endforeach()