diff options
author | David Cole <david.cole@kitware.com> | 2011-08-02 19:10:15 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-08-02 19:10:15 (GMT) |
commit | 782488596062649703919066cd1a84f05fd24e18 (patch) | |
tree | a4a012c6c7789eb7c0f6c550e229949b798a50ae /Tests | |
parent | 330577ce875568bc0906ac08cd6c2a638ab503eb (diff) | |
parent | 0baf5659c6222175b5d0a5b47d45e145dbdb8400 (diff) | |
download | CMake-782488596062649703919066cd1a84f05fd24e18.zip CMake-782488596062649703919066cd1a84f05fd24e18.tar.gz CMake-782488596062649703919066cd1a84f05fd24e18.tar.bz2 |
Merge topic 'adjust-path-for-all-generators-test'
0baf565 Ensure libgmp-10.dll is in the PATH for CMakeTestAllGenerators
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeTestAllGenerators/RunCMake.cmake | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Tests/CMakeTestAllGenerators/RunCMake.cmake b/Tests/CMakeTestAllGenerators/RunCMake.cmake index dcf4a23..6d27d3b 100644 --- a/Tests/CMakeTestAllGenerators/RunCMake.cmake +++ b/Tests/CMakeTestAllGenerators/RunCMake.cmake @@ -60,6 +60,28 @@ message(STATUS "CTEST_FULL_OUTPUT (Avoid ctest truncation of output)") message(STATUS "CMake generators='${generators}'") +# If we'll be testing any of the MinGW Makefiles generators, adjust the +# ENV{PATH} to make sure libgmp-10.dll can be loaded as needed. But only if +# the testing machine has a default MinGW install... (If you have a +# non-default install, append to the PATH before running the test...) +# +if(generators MATCHES "MinGW Makefiles") + if(EXISTS "C:/MinGW/bin/libgmp-10.dll") + string(TOLOWER "$ENV{PATH}" path) + if(NOT path MATCHES "/mingw/bin") + if(UNIX) + set(sep ":") + set(mingw_bin "/mingw/bin") + else() + set(sep ";") + set(mingw_bin "C:/MinGW/bin") + endif() + set(ENV{PATH} "$ENV{PATH}${sep}${mingw_bin}") + message(STATUS "info: appending '${sep}${mingw_bin}' to the PATH") + endif() + endif() +endif() + # First setup a source tree to run CMake on. # execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory |