testcflags.c 395 B

123456789101112131415
  1. #include <string.h>
  2. int TestCFlags(char* m)
  3. {
  4. /* TEST_CXX_FLAGS should not be defined in a c file */
  5. #ifdef TEST_CXX_FLAGS
  6. strcpy(m, "CMake CMAKE_CXX_FLAGS (TEST_CXX_FLAGS) found in c file.");
  7. return 0;
  8. #endif
  9. /* TEST_C_FLAGS should be defined in a c file */
  10. #ifndef TEST_C_FLAGS
  11. strcpy(m, "CMake CMAKE_C_FLAGS (TEST_C_FLAGS) not found in c file.");
  12. return 0;
  13. #endif
  14. return 1;
  15. }