This repository was archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Using existing projects
offa edited this page Jul 24, 2016
·
1 revision
Enabling Test Support for NetBeans projects created from existing C / C++ projects (eg. Makefile, CMake, …).
The project requires two defined make targets:
-
build-tests– builds the tests, executed before running the tests (can be empty) -
test– runs the tests (using verbose output)
Note: test is a reserved target on Cmake – please see A. Workaround for CMake.
In addition, the Netbeans Project configuration must contain a Test Files Folder. The project can be upgraded using the New File Wizzard for Unit Test / Test Main files.
- Go to
New Files → Unit Tests → <select any> - Enable "Configure custom Project"
A Test Files folder is added to the NetBeans project – not visible at file level.
This step is needed only once per project, though doing this more than once has no effect.
To workaround the reserved test-Target:
-
Don't call
enable_testing() - Set Policy for CMP0037 to
OLD:cmake_policy(SET CMP0037 OLD)(related: CMake #12960)

