|
|
@@ -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}}")
|