Commit 3c0652f8 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'testRST-no-preprocessor-FILE'

218699eb Tests: Fix CMakeLib.testRST for relative __FILE__
parents 8c29d8d1 218699eb
......@@ -13,6 +13,8 @@ set(CMakeLib_TESTS
testXMLSafe
)
set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR})
if(WIN32)
list(APPEND CMakeLib_TESTS
testVisualStudioSlnParser
......@@ -39,7 +41,7 @@ if(CMAKE_OSX_ARCHITECTURES AND XCODE
endif()
foreach(test ${CMakeLib_TESTS})
add_test(CMakeLib.${test} CMakeLibTests ${test})
add_test(CMakeLib.${test} CMakeLibTests ${test} ${${test}_ARGS})
endforeach()
if(TEST_CompileCommandOutput)
......
......@@ -25,9 +25,14 @@ void reportLine(std::ostream& os, bool ret, std::string line, bool eol)
}
}
int testRST(int, char*[])
int testRST(int argc, char* argv[])
{
std::string dir = cmSystemTools::GetFilenamePath(__FILE__);
if(argc != 2)
{
std::cerr << "Usage: testRST <dir>" << std::endl;
return 1;
}
std::string dir = argv[1];
if(dir.empty())
{
dir = ".";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment