diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-02 16:44:00 -0500 |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-11-02 16:44:00 -0500 |
commit | 3714d9419c3f90a753bb7e96c9260b674f486916 (patch) | |
tree | 3f5ad75c44338e22e5f7ee1754f5c506e11cdd6f /Modules/FindUnixCommands.cmake | |
parent | bc673070bc5f5fccdf404fd687ee57c9bb6f0684 (diff) | |
download | cmake-3714d9419c3f90a753bb7e96c9260b674f486916.tar.gz |
Move usual Unix commands to FindUnixCommands, use FingCygwin in other modules
Diffstat (limited to 'Modules/FindUnixCommands.cmake')
-rw-r--r-- | Modules/FindUnixCommands.cmake | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake new file mode 100644 index 0000000000..4269983d57 --- /dev/null +++ b/Modules/FindUnixCommands.cmake @@ -0,0 +1,82 @@ +# +# this module looks for some usual Unix commands +# + +INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) + +IF (CYGWIN_INSTALL_PATH) + + FIND_PROGRAM(BASH + bash + ${CYGWIN_INSTALL_PATH}/bin + ) + + FIND_PROGRAM(GZIP + gzip + ${CYGWIN_INSTALL_PATH}/bin + ) + + FIND_PROGRAM(MV + mv + ${CYGWIN_INSTALL_PATH}/bin + ) + + FIND_PROGRAM(RM + rm + ${CYGWIN_INSTALL_PATH}/bin + ) + + FIND_PROGRAM(TAR + NAMES + tar + gtar + PATH + ${CYGWIN_INSTALL_PATH}/bin + ) + +ELSE (CYGWIN_INSTALL_PATH) + + FIND_PROGRAM(BASH + bash + /bin + /usr/bin + /usr/local/bin + /sbin + ) + + FIND_PROGRAM(GZIP + gzip + /bin + /usr/bin + /usr/local/bin + /sbin + ) + + FIND_PROGRAM(MV + mv + /bin + /usr/bin + /usr/local/bin + /sbin + ) + + FIND_PROGRAM(RM + rm + /bin + /usr/bin + /usr/local/bin + /sbin + ) + + FIND_PROGRAM(TAR + NAMES + tar + gtar + PATH + /bin + /usr/bin + /usr/local/bin + /sbin + ) + +ENDIF (CYGWIN_INSTALL_PATH) |