Home.cmake 523 B

12345678910111213141516171819
  1. # Find a home in which to build.
  2. if(NOT DEFINED HOME)
  3. if(DEFINED ENV{CTEST_REAL_HOME})
  4. set(HOME "$ENV{CTEST_REAL_HOME}")
  5. else()
  6. set(HOME "$ENV{HOME}")
  7. endif()
  8. if(NOT HOME AND WIN32)
  9. # Try for USERPROFILE as HOME equivalent:
  10. string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}")
  11. # But just use root of SystemDrive if USERPROFILE contains any spaces:
  12. # (Default on XP and earlier...)
  13. if(HOME MATCHES " ")
  14. string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}")
  15. endif()
  16. endif()
  17. endif()