Remove support for unit tests manual registration. #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Manual unit test registration has been declared obsolete and deprecated
within Boost unit test framework [1] and replaced by automatic unit test
registration [2] and fixtures [3].
More practical and negative side-effect of having this support included
in the build in its current form is rendering the clang-based tools almost
inoperable because it invalidates the contents of
compile_commands.json
file. This is the file that clang-based tools rely on in order to
implement their functionality. I.e. current state is that running the
following command in the root of the repository:
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
will generate a JSON file which contains invalid entries such as:
-I/home/jbakamovic/development/projects/adobe_source_libraries/-DBOOST_TEST_MAIN
Mind the missing space between the include directory and the preprocessor
define.
This is probably a bug in CMake but also a 'bug' in this repository build
rules because
CMakeLists.txt
is confusingtarget_include_directories()
with
target_compile_definitions()
for bringing in the preprocessordefine (in this specific case
-DBOOST_TEST_MAIN
).[1] http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/adv_scenarios/obsolete_init_func.html
[2] http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/tests_organization/test_cases/test_organization_nullary.html#ref_BOOST_AUTO_TEST_CASE
[3] http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/tests_organization/fixtures.html