no_matching_c_feature.cmake 326 B

123456789101112131415
  1. if (NOT ";${CMAKE_C_COMPILE_FEATURES};" MATCHES ";gnu_c_typeof;")
  2. # Simulate passing the test.
  3. message(SEND_ERROR
  4. "The compiler feature \"gnu_c_dummy\" is not known to C compiler\n\"GNU\"\nversion 4.8.1."
  5. )
  6. return()
  7. endif()
  8. add_executable(main empty.c)
  9. target_compile_features(main
  10. PRIVATE
  11. gnu_c_typeof
  12. )