diff options
author | Michael Tänzer <neo@nhng.de> | 2013-02-28 14:26:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-02-28 14:48:11 (GMT) |
commit | 5260a864f5571eeb5697fb2e3b2dda0407de0a7b (patch) | |
tree | 53bbabf121ad06d5ff0f9d111ef3bccb545cb9c3 /Modules/GetPrerequisites.cmake | |
parent | 2929768541d8ad9d7cfb2a46da676b2dcbb216a4 (diff) | |
download | CMake-5260a864f5571eeb5697fb2e3b2dda0407de0a7b.zip CMake-5260a864f5571eeb5697fb2e3b2dda0407de0a7b.tar.gz CMake-5260a864f5571eeb5697fb2e3b2dda0407de0a7b.tar.bz2 |
GetPrerequisites: Move tool search paths up
Make them usable in the gp_tool selection heuristic.
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 8f2754e..c37417c 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -567,6 +567,17 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa message("warning: target '${target}' does not exist...") endif() + set(gp_cmd_paths ${gp_cmd_paths} + "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin" + "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin" + "C:/Program Files/Microsoft Visual Studio 8/VC/BIN" + "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN" + "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN" + "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN" + "/usr/local/bin" + "/usr/bin" + ) + # <setup-gp_tool-vars> # # Try to choose the right tool by default. Caller can set gp_tool prior to @@ -582,6 +593,13 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa endif() endif() + find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths}) + + if(NOT gp_cmd) + message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...") + return() + endif() + set(gp_tool_known 0) if("${gp_tool}" STREQUAL "ldd") @@ -619,23 +637,6 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa return() endif() - set(gp_cmd_paths ${gp_cmd_paths} - "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin" - "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin" - "C:/Program Files/Microsoft Visual Studio 8/VC/BIN" - "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN" - "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN" - "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN" - "/usr/local/bin" - "/usr/bin" - ) - - find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths}) - - if(NOT gp_cmd) - message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...") - return() - endif() if("${gp_tool}" STREQUAL "dumpbin") # When running dumpbin, it also needs the "Common7/IDE" directory in the |