[cmake] allow to override the cxx standard#120
Open
fabiencastan wants to merge 3 commits intolaurentkneip:masterfrom
Open
[cmake] allow to override the cxx standard#120fabiencastan wants to merge 3 commits intolaurentkneip:masterfrom
fabiencastan wants to merge 3 commits intolaurentkneip:masterfrom
Conversation
from cmake command line
simogasp
suggested changes
Jun 5, 2023
| set_target_properties( opengv random_generators PROPERTIES | ||
| SOVERSION ${PROJECT_VERSION} | ||
| VERSION ${PROJECT_VERSION} | ||
| CXX_STANDARD 11 |
Contributor
There was a problem hiding this comment.
same thing at line 333 below for the tests
| VERSION ${PROJECT_VERSION} | ||
| CXX_STANDARD 11 | ||
| CXX_STANDARD_REQUIRED ON | ||
| DEBUG_POSTFIX d ) |
Contributor
There was a problem hiding this comment.
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."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.