check-part4.cmake 947 B

123456789101112131415161718192021222324252627282930313233
  1. include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake)
  2. if(msys1_prefix)
  3. string(REPLACE "${msys1_prefix}" "" test_shell_path ${test_shell_path})
  4. endif()
  5. if(WIN32)
  6. if(CMAKE_GENERATOR STREQUAL "MSYS Makefiles")
  7. check(test_shell_path [[/c/shell/path]])
  8. elseif(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
  9. check(test_shell_path [[c:/shell/path]])
  10. else()
  11. check(test_shell_path [[c:\shell\path]])
  12. endif()
  13. else()
  14. check(test_shell_path [[/shell/path]])
  15. endif()
  16. if(WIN32)
  17. if(CMAKE_GENERATOR STREQUAL "MSYS Makefiles" AND NOT msys1_prefix)
  18. check(test_shell_path2 [[/c/shell/path:/d/another/path]])
  19. elseif(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
  20. check(test_shell_path2 [[c:/shell/path;d:/another/path]])
  21. else()
  22. check(test_shell_path2 [[c:\shell\path;d:\another\path]])
  23. endif()
  24. else()
  25. check(test_shell_path2 [[/shell/path:/another/path]])
  26. endif()
  27. check(if_1 "a")
  28. check(if_2 "b")
  29. check(if_3 "b")
  30. check(if_4 "a")