<html>
<head>
<meta name="generator" content="Windows Mail 17.5.9600.20413">
<style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}
p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin:0in;
margin-bottom:.0001pt;
}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst,
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle,
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head>
<body dir="ltr">
<div data-externalstyle="false" dir="ltr" style="font-family: 'Calibri', 'Segoe UI', 'Meiryo', 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'sans-serif';font-size:12pt;"><div>Hi!</div><div><br></div><div>I am having trouble passing command line arguments to unit tests using the add_test() command. It seems that the arguments are always cut off, no matter what I do. I have tried</div><div><br></div><div>add_test( NAME TestSTLArithmetics COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestSTLArithmetics “-L 31”)</div><div><br></div><div>add_test( NAME TestSTLArithmetics COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestSTLArithmetics -L 31)</div><div><br></div><div>add_test( NAME TestSTLArithmetics COMMAND “${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestSTLArithmetics -L 31”)</div><div><br></div><div>But none of these work.</div><div><br></div><div>As for the Visual Studio part, I would like to have the tests seperately have command line arguments, not just when called by the RUN_TESTS project.</div><div><br></div><div>Here is the Visual Studio specific part of my CMakeFile.txt:</div><div><br></div><div>if(MSVC_VERSION)<br> set_target_properties (TestSTLArithmetics PROPERTIES COMPILE_FLAGS ${MSVC_COMPILER_FLAGS})<br> set_target_properties (TestSTLArithmetics PROPERTIES LINK_FLAGS ${MSVC_LINKER_FLAGS})<br> <br> set_target_properties (TestSTLArithmetics PROPERTIES COMMAND_ARGUMENTS "-L 31")<br>endif(MSVC_VERSION)</div><div><br></div><div>But nothing happens inside the project file.</div><div><br></div><div>What is the correct syntax to do these?<br></div></div>
</body>
</html>