ECMAddTestsΒΆ
Add test executables.
ecm_add_test(<sources> LINK_LIBRARIES <library> [<library> [...]]
[TEST_NAME <name>]
[NAME_PREFIX <prefix>]
[GUI])
Add a new unit test using the passed source files. The parameter TEST_NAME is used to set the name of the resulting test, and the target built for and run by the test. It may be omitted if there is exactly one source file. In that case the name of the source file (without the file extension) will be used as the test name.
If NAME_PREFIX is given, this prefix will be prepended to the test name, but not the target name. As a result, it will not prevent clashes between tests with the same name in different parts of the project, but it can be used to give an indication of where to look for a failing test.
If the flag GUI is passed the test binary will be a GUI executable, otherwise the resulting binary will be a console application. The test will be linked against the libraries and/or targets passed to LINK_LIBRARIES.
ecm_add_tests(<sources> LINK_LIBRARIES <library> [<library> [...]]
[NAME_PREFIX <prefix>]
[GUI])
This is a convenient version of ecm_add_test() for when you have many tests that consist of a single source file each. It behaves like calling ecm_add_test() once for each source file, with the same named arguments.
Since pre-1.0.0.