diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-22 21:00:00 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-10-22 21:00:00 (GMT) |
commit | 040f7768859ae974d10ef24670768fce574bb2e4 (patch) | |
tree | 42b9e48b578e01521bfe3266e26616fa555bfffd /Tests/ComplexOneConfig/Executable/complex.cxx | |
parent | 43bc8a0d63705d57481ec7c9cefed1b65402e98f (diff) | |
download | CMake-040f7768859ae974d10ef24670768fce574bb2e4.zip CMake-040f7768859ae974d10ef24670768fce574bb2e4.tar.gz CMake-040f7768859ae974d10ef24670768fce574bb2e4.tar.bz2 |
FIX: fix the problem where a target is a single character and nmake gets confused and add a test for it
Diffstat (limited to 'Tests/ComplexOneConfig/Executable/complex.cxx')
-rw-r--r-- | Tests/ComplexOneConfig/Executable/complex.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index adf99d7..441a291 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -111,7 +111,35 @@ int main() lib += CMAKE_INTDIR; lib += "/"; #endif + std::string exe = lib; + // Test a single character executable to test a: in makefiles + exe += "A"; + exe += cmSystemTools::GetExecutableExtension(); + int ret; + std::string errorMessage; + if(cmSystemTools::RunSingleCommand(exe.c_str(), 0, &ret)) + { + if(ret != 10) + { + errorMessage += exe; + errorMessage += " did not return 10"; + } + } + else + { + errorMessage += exe; + errorMessage += ": failed to run."; + } + if(errorMessage.size()) + { + cmFailed(errorMessage.c_str()); + } + else + { + cmPassed("run Single Character executable A returned 10 as expected."); + } + lib += cmDynamicLoader::LibPrefix(); lib += "CMakeTestModule"; lib += cmDynamicLoader::LibExtension(); |