1 function(TARGET_SUPPORTS_EXECUTABLES)
2 set(CMAKE_REQUIRED_QUIET 1)
3 include(CheckCSourceCompiles)
4 set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE)
5 check_c_source_compiles("int main() {}" TARGET_SUPPORTS_EXECUTABLES)
7 TARGET_SUPPORTS_EXECUTABLES()