No tests found when using gtest with cmake/ctest

后端 未结 2 737
南笙
南笙 2020-12-16 16:57

I have a project with the following structure:

linalg
├── build
├── CMakeLists.txt
├── docs
│   └── Doxyfile
├── include
│   └── linalg
│       └── vector3.h         


        
2条回答
  •  伪装坚强ぢ
    2020-12-16 17:02

    Just to update this.

    cmake in version 3.9 added support for GoogleTest integration with CTest.

    So you can now get CTest to scrape all of the test macros in your test executable, not just the whole executable.

    Example here: https://gist.github.com/johnb003/65982fdc7a1274fdb023b0c68664ebe4

提交回复
热议问题