Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong compiler standard in CMakeLists.txt #511

Closed
adryan1994 opened this issue May 12, 2023 · 2 comments
Closed

Wrong compiler standard in CMakeLists.txt #511

adryan1994 opened this issue May 12, 2023 · 2 comments
Labels

Comments

@adryan1994
Copy link

System information (version)

  • Sophus => 1.22.10
  • Operating System / Platform => Linux / Ubuntu 22.04 LTS
  • Compiler => gcc 11.3.0

Multiple errors occurring during installation process because of C++14 compiler standard instead of C++17 in CMakeLists.txt file:

/usr/local/include/ceres/product_manifold.h:274:36: note: ‘std::void_t’ is only available from C++17 onwards

Solution:

  • Change line 27 to set(CMAKE_CXX_STANDARD 17)
  • Change line 37 to SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -std=c++17-Wno-deprecated-declarations -ftemplate-backtrace-limit=0")

Steps to Reproduce

  1. git clone https://github.com/strasdat/Sophus.git
  2. cd Sophus && mkdir build && cd build
  3. cmake ..
  4. make

Expected behavior
Successful installation

Sophus version: commit hash

61f9a98

@adryan1994 adryan1994 added the bug label May 12, 2023
@Alex-Beh
Copy link

Hi, I am facing the same issue and managed to compile the project with your suggestion. I think it would be great if you can open an PR for this issue.

@strasdat
Copy link
Owner

#538 updates to c++17 among other changes. Please re-open if more changes to the cmake file is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants