diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2019-06-17 18:31:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-06-21 15:06:39 (GMT) |
commit | f0a89149bc569020e281c5908733bf4b7eeddf15 (patch) | |
tree | 627b30ee8dee5645c1b65735b39ca240e093730c /Tests/RunCMake/RunCMake.cmake | |
parent | 6425a5f3a06459914cca17172e2b6f557e7d79a4 (diff) | |
download | CMake-f0a89149bc569020e281c5908733bf4b7eeddf15.zip CMake-f0a89149bc569020e281c5908733bf4b7eeddf15.tar.gz CMake-f0a89149bc569020e281c5908733bf4b7eeddf15.tar.bz2 |
RunCMake: Automatically support platform out override files
Diffstat (limited to 'Tests/RunCMake/RunCMake.cmake')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index ad3f8f6..e730d6e 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -21,10 +21,20 @@ function(run_cmake test) else() set(expect_result 0) endif() + + string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} platform_name) + if(platform_name MATCHES cygwin) + #remove all additional bits from cygwin name + set(platform_name cygwin) + endif() + foreach(o out err) if(RunCMake-std${o}-file AND EXISTS ${top_src}/${RunCMake-std${o}-file}) file(READ ${top_src}/${RunCMake-std${o}-file} expect_std${o}) string(REGEX REPLACE "\n+$" "" expect_std${o} "${expect_std${o}}") + elseif(EXISTS ${top_src}/${test}-std${o}-${platform_name}.txt) + file(READ ${top_src}/${test}-std${o}-${platform_name}.txt expect_std${o}) + string(REGEX REPLACE "\n+$" "" expect_std${o} "${expect_std${o}}") elseif(EXISTS ${top_src}/${test}-std${o}.txt) file(READ ${top_src}/${test}-std${o}.txt expect_std${o}) string(REGEX REPLACE "\n+$" "" expect_std${o} "${expect_std${o}}") |