Skip to content

Conversation

@fabiencastan
Copy link
Contributor

When using multiple libraries using eigen, they all need to agree on the way we use memory alignment in eigen.
See https://eigen.tuxfamily.org/dox/group__TopicStlContainers.html
As we have moved to C++17, we need all libraries using eigen to be compatible with that.

The solution is simple: define a cmake cached variable, so it can be overriden.

This PR also add some missing includes, needed to build with g++ 10.

set_target_properties( opengv random_generators PROPERTIES
SOVERSION ${PROJECT_VERSION}
VERSION ${PROJECT_VERSION}
CXX_STANDARD 11
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing at line 333 below for the tests

VERSION ${PROJECT_VERSION}
CXX_STANDARD 11
CXX_STANDARD_REQUIRED ON
DEBUG_POSTFIX d )
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
DEBUG_POSTFIX d )
)

For DEBUG_POSTFIXwe can just set a cache variable that initialize CMAKE_DEBUG_POSTFIX that will automatically set it for all targets, without doing it explicitly:

set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "The postfix to use for the debug version of the target names")

from gcc documentation: "-march=cpu-type allows GCC to generate code
that may not run at all on processors other than the one indicated."
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.

2 participants