Skip to content

Conversation

@llawall
Copy link
Collaborator

@llawall llawall commented Dec 14, 2017

scons now builds a mac build (with statically linked xerces and boost) and a Linux build with shared libs for xerces and boost.

I'd like to keep these consistent and preferably statically linked but the boost RPM in RHEL that I'm using appears to not compile the boost static libs as PIC.


template <variant_base::enum_type_t E>
void data_table_column<E>::push_back_impl(const variant& value, variant* p = 0)
void data_table_column<E>::push_back_impl(const variant& value, variant* p/* = 0*/)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just remove rather than commenting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting defaults is the style used elsewhere in the project.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Not nice but probably better to be consistent.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's quite common to do this as 'documentation' of what the default value is. (I've never seen the purpose really.)

Ought to be using nullptr of course :)

if sys.platform == 'linux2':
libs += ['libxerces-c-3.1']
linkflags = ['-Wl,--gc-sections', '-Wl,-rpath', '.']
if sys.platform == 'darwin':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be elif and also a catch-all else at the end to report an unsupported platform?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add elif and else raise but I don't think we gain that much - the likelihood of compiling anywhere else is very slim and the previous script didn't raise if Linux wasn't the platform being targetted.

'libboost_filesystem',
'libboost_iostreams',
'libboost_regex',
'libboost_system']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

libs is overwritten in the darwin case so shouldn't this just be inside the linux2 branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the darwin case, libs uses these names to build absolute paths to the static libraries to be linked.

@mparry
Copy link
Contributor

mparry commented Dec 20, 2017

As I've also pushed a change here now, I think it would be good if someone else also approved.

@mparry mparry closed this Dec 20, 2017
@mparry mparry reopened this Dec 20, 2017
@llawall llawall merged commit af2f406 into proteanic:master Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants