Incorrect using C/C++ preprocessor definitions through cmake add_definitions

Description

C/C++ preprocessor definitions can be defined with cmake add_definitions for example, add_definitions (-D_USE_OPENSSL). At C/C++ it should be used as "#ifdef USE_OPENSSL". But currently leading "" in some code which will cause unexpected code get compiled and built.

Three potential incorrect usages include "XALAN", "OPENSSL" and "TBB"

Conclusion

None

Activity

Show:

Gavin Halliday February 26, 2016 at 2:10 PM

The tbb examples are from very old (several years) experiments when I was looking in to the benefits of using the tbb allocator instead of the standard heap allocator. They are not related to the option that was added to commonSetup.

The #ifdefs and their contents should be deleted

Richard Chapman February 26, 2016 at 9:45 AM

Can you comment on the tbb issue

On the logging service issue I suspect you will need to suppress building of the component altogether if SSL is not available,

Xiaoming Wang February 25, 2016 at 9:30 PM
Edited

After make the changes there are compile errors:

log: http://10.176.32.6/view/Custom-Builds/job/CE-Candidate-6.0.0-JIRA-14999/CE=ubuntu-14.04-amd64/4/console

If build with -DUSE_TBB=OFF it works.
If build with -DUSE_TBB=OFF and -DUSE_OPENSSL=OFF it fails since ws_loggingservice need securesocket which is only built with -DUSE_OPENSSL=ON

log: http://10.176.32.6/job/CE-Candidate-6.0.0-JIRA-14999/CE=ubuntu-14.04-amd64/3/console

branch: https://github.com/xwang2713/HPCC-Platform/tree/HPCC_14999_preprocessor

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Compatibility

Major

Fix versions

Affects versions

Created February 25, 2016 at 2:02 PM
Updated March 4, 2016 at 8:50 AM
Resolved March 4, 2016 at 8:50 AM