PchDebugGenex-check.cmake 610 B

1234567891011121314151617
  1. if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
  2. return()
  3. endif()
  4. set(foo_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/Debug/cmake_pch.h")
  5. if (NOT EXISTS ${foo_pch_header})
  6. set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} does not exist")
  7. return()
  8. endif()
  9. file(STRINGS ${foo_pch_header} foo_pch_header_strings)
  10. if (NOT foo_pch_header_strings MATCHES ";#include \"[^\"]*PrecompileHeaders/include/foo.h\";#include <stdio.h>(;|$)")
  11. set(RunCMake_TEST_FAILED "Generated foo pch header\n ${foo_pch_header}\nhas bad content:\n ${foo_pch_header_strings}")
  12. return()
  13. endif()