no_matching_c_feature.cmake 347 B

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