I'm test-driving CMake for a new project I've just started and I'm
currently trying to set up a unit test framework. The project is a
dynamic library written in C++, the unit tests are based on Boost test,
and the project tree is organized essentially as follows:
.
├── CMakeLists.txt
├── mylibrary
│ ├── CMakeLists.txt
│ └── sample.c++
└── unit_tests
├── CMakeLists.txt
└── test_sample.c++
I believe that I've managed to get things up and running, but in the
process I've stumbled on an issue.
Apparently, if I call the enable_testing() macro within
${Project}/unit_tests/CMakeLists.txt, calling make test does nothing,
and the following error message is shown:
make: *** No rule to make target `test'. Stop.
Yet, if enable_testing() is called from ${Project}/CMakeLists.txt,
calling make test runs as expected.
Am I missing something?
Thanks
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake