check-part4.cmake 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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")
  18. if(msys1_prefix)
  19. # The comparison was done at generate time with the STREQUAL genex.
  20. check(test_shell_path2 [[1]])
  21. else()
  22. check(test_shell_path2 [[/c/shell/path:/d/another/path]])
  23. endif()
  24. elseif(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
  25. check(test_shell_path2 [[c:/shell/path;d:/another/path]])
  26. else()
  27. check(test_shell_path2 [[c:\shell\path;d:\another\path]])
  28. endif()
  29. else()
  30. check(test_shell_path2 [[/shell/path:/another/path]])
  31. endif()
  32. check(if_1 "a")
  33. check(if_2 "b")
  34. check(if_3 "b")
  35. check(if_4 "a")