diff options
author | Sebastien Barre <sebastien.barre@kitware.com> | 2001-12-04 10:55:17 -0500 |
---|---|---|
committer | Sebastien Barre <sebastien.barre@kitware.com> | 2001-12-04 10:55:17 -0500 |
commit | cb4f04c94e5815393e9b1d765588c23656149b4e (patch) | |
tree | e1586635e8c85d0e88faf7b42451f9d8f2de40ca /Modules | |
parent | f68e64e2d8488a57740cc5b2fb0f914a769c4e8e (diff) | |
download | cmake-cb4f04c94e5815393e9b1d765588c23656149b4e.tar.gz |
Remove unneeded test and code duplication. Add WIN32 test. Make all ADVANCED.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Documentation.cmake | 6 | ||||
-rw-r--r-- | Modules/FindCygwin.cmake | 16 | ||||
-rw-r--r-- | Modules/FindDoxygen.cmake | 9 | ||||
-rw-r--r-- | Modules/FindHhc.cmake | 16 | ||||
-rw-r--r-- | Modules/FindPerl.cmake | 26 | ||||
-rw-r--r-- | Modules/FindSelfPackers.cmake | 58 | ||||
-rw-r--r-- | Modules/FindUnixCommands.cmake | 163 | ||||
-rw-r--r-- | Modules/FindWget.cmake | 22 |
8 files changed, 153 insertions, 163 deletions
diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake index c86e704272..f090aebe32 100644 --- a/Modules/Documentation.cmake +++ b/Modules/Documentation.cmake @@ -7,6 +7,7 @@ # Build the documentation ? # OPTION(BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF) +MARK_AS_ADVANCED(BUILD_DOCUMENTATION) IF (BUILD_DOCUMENTATION) @@ -25,6 +26,11 @@ IF (BUILD_DOCUMENTATION) OPTION(DOCUMENTATION_HTML_TARZ "Build a compressed tar archive of the HTML doc." OFF) + MARK_AS_ADVANCED( + DOCUMENTATION_HTML_HELP + DOCUMENTATION_HTML_TARZ + ) + # # The documentation process is controled by a batch file. # We will probably need bash to create the custom target diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake index 7c4f8b19f5..8fe326bf9f 100644 --- a/Modules/FindCygwin.cmake +++ b/Modules/FindCygwin.cmake @@ -2,8 +2,14 @@ # this module looks for Cygwin # -FIND_PATH(CYGWIN_INSTALL_PATH - cygwin.bat - "C:/Cygwin" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]" -) +IF (WIN32) + FIND_PATH(CYGWIN_INSTALL_PATH + cygwin.bat + "C:/Cygwin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]" + ) + + MARK_AS_ADVANCED( + CYGWIN_INSTALL_PATH + ) +ENDIF (WIN32) diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index 586a9342d3..3b8fc9fc5c 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -12,7 +12,12 @@ FIND_PROGRAM(DOT ) # HKEY_CURRENT_USER\Software\AT&T\Graphviz -# Since most of the time dot is called by Doxygen, the path to dot is useful too +# Since most of the time dot is called by Doxygen, the path to dot is +# useful too GET_FILENAME_COMPONENT(DOT_PATH ${DOT} PATH CACHE) - +MARK_AS_ADVANCED( + DOT + DOT_PATH + DOXYGEN +) diff --git a/Modules/FindHhc.cmake b/Modules/FindHhc.cmake index 0df243d61c..859f0617c6 100644 --- a/Modules/FindHhc.cmake +++ b/Modules/FindHhc.cmake @@ -2,8 +2,14 @@ # this module looks for Microsoft HTML Help Compiler # -FIND_PROGRAM(HHC - hhc - "C:/Program Files/HTML Help Workshop" - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" -) +IF (WIN32) + FIND_PROGRAM(HHC + hhc + "C:/Program Files/HTML Help Workshop" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" + ) + + MARK_AS_ADVANCED( + HHC + ) +ENDIF (WIN32) diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake index 79a88a1bdf..af2328b19b 100644 --- a/Modules/FindPerl.cmake +++ b/Modules/FindPerl.cmake @@ -4,21 +4,13 @@ INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) -IF (CYGWIN_INSTALL_PATH) +FIND_PROGRAM(PERL + perl + "C:/Perl/bin" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin + ${CYGWIN_INSTALL_PATH}/bin +) - FIND_PROGRAM(PERL - perl - "C:/Perl/bin" - [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin - ${CYGWIN_INSTALL_PATH}/bin - ) - -ELSE (CYGWIN_INSTALL_PATH) - - FIND_PROGRAM(PERL - perl - "C:/Perl/bin" - [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\628]/bin - ) - -ENDIF (CYGWIN_INSTALL_PATH) +MARK_AS_ADVANCED( + PERL +) diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake index 2978bb7eb6..979ebac22d 100644 --- a/Modules/FindSelfPackers.cmake +++ b/Modules/FindSelfPackers.cmake @@ -8,37 +8,28 @@ INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) -IF (CYGWIN_INSTALL_PATH) - - FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE - upx - ${CYGWIN_INSTALL_PATH}/bin - ) - - FIND_PROGRAM(SELF_PACKER_FOR_SHARED_LIB - upx - ${CYGWIN_INSTALL_PATH}/bin - ) - -ELSE (CYGWIN_INSTALL_PATH) - - FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE - upx - /bin - /usr/bin - /usr/local/bin - /sbin - ) - - FIND_PROGRAM(SELF_PACKER_FOR_SHARED_LIB - upx - /bin - /usr/bin - /usr/local/bin - /sbin - ) - -ENDIF (CYGWIN_INSTALL_PATH) +FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE + upx + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) + +FIND_PROGRAM(SELF_PACKER_FOR_SHARED_LIB + upx + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) + +MARK_AS_ADVANCED( + SELF_PACKER_FOR_EXECUTABLE + SELF_PACKER_FOR_SHARED_LIB +) # # Set flags @@ -58,3 +49,8 @@ ELSE (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "" CACHE STRING "Flags for the shared lib self-packer.") ENDIF (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") + +MARK_AS_ADVANCED( + SELF_PACKER_FOR_EXECUTABLE_FLAGS + SELF_PACKER_FOR_SHARED_LIB_FLAGS +) diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake index c402ad53c9..568f3bc463 100644 --- a/Modules/FindUnixCommands.cmake +++ b/Modules/FindUnixCommands.cmake @@ -4,92 +4,77 @@ INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) -IF (CYGWIN_INSTALL_PATH) - - FIND_PROGRAM(BASH - bash - ${CYGWIN_INSTALL_PATH}/bin - ) - - FIND_PROGRAM(CP - cp - ${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(CP - cp - /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) +FIND_PROGRAM(BASH + bash + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + BASH +) + +FIND_PROGRAM(CP + cp + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + CP +) + +FIND_PROGRAM(GZIP + gzip + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + GZIP +) + +FIND_PROGRAM(MV + mv + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + MV +) + +FIND_PROGRAM(RM + rm + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + RM +) + +FIND_PROGRAM(TAR + NAMES + tar + gtar + PATH + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + TAR +) diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake index 5a2110c416..1ebdd57b0b 100644 --- a/Modules/FindWget.cmake +++ b/Modules/FindWget.cmake @@ -4,17 +4,11 @@ INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake) -IF (CYGWIN_INSTALL_PATH) - - FIND_PROGRAM(WGET - wget - ${CYGWIN_INSTALL_PATH}/bin - ) - -ELSE (CYGWIN_INSTALL_PATH) - - FIND_PROGRAM(WGET - wget - ) - -ENDIF (CYGWIN_INSTALL_PATH) +FIND_PROGRAM(WGET + wget + ${CYGWIN_INSTALL_PATH}/bin +) + +MARK_AS_ADVANCED( + WGET +) |