I'm making a project with cmake and I want to add tests. This is my first time using cmake, so I'm kinda walking in the dark. Does anyone have any examples on how to start this procedure, or an open source project I could look at?

Thx

有帮助吗?

解决方案

Just add this lines to your CMakeLists.txt

enable_testing()
add_executable(exec_name exec_source_file)
add_test(test_name exec_name)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top