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

compiler toolchain tweaks #545

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
echo "Install test"
mkdir build_dir
cd build_dir
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. -DSOPHUS_ENABLE_ENSURE_HANDLER=$SOPHUS_ENABLE_ENSURE_HANDLER
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. -DBUILD_SOPHUS_TESTS=Off -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DSOPHUS_ENABLE_ENSURE_HANDLER=$SOPHUS_ENABLE_ENSURE_HANDLER
# Ubuntu builds via Github actions run on 2-core virtual machines
make -j2
sudo make install
Expand Down
23 changes: 11 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(Sophus VERSION 1.24.06)
cmake_minimum_required(VERSION 3.24)
project(Sophus VERSION 1.24.6)

include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
Expand All @@ -24,20 +24,19 @@ if(SOPHUS_MASTER_PROJECT)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_COMPILE_WARNING_AS_ERROR Off)

# Set compiler specific settings (FixMe: Should not cmake do this for us
# automatically?)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wno-deprecated-register -Qunused-arguments -fcolor-diagnostics"
)
add_compile_options(-Wall -Wextra -Wno-deprecated-register
-Qunused-arguments -fcolor-diagnostics)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -std=c++14 -Wno-deprecated-declarations -ftemplate-backtrace-limit=0 -Wno-array-bounds"
)
add_compile_options(-Wall -Wextra -Wno-deprecated-declarations
-ftemplate-backtrace-limit=0 -Wno-array-bounds)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_compile_options(/bigobj /wd4305 /wd4244 /MP)
add_compile_definitions(_USE_MATH_DEFINES)
endif()

# Add local path for finding packages, set the local version first
Expand Down
4 changes: 2 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.16)
cmake_minimum_required(VERSION 3.24)

project(SophusExample)

find_package(Sophus 1.24.06 REQUIRED)
find_package(Sophus 1.24.6 REQUIRED)
set(CMAKE_CXX_STANDARD 17)

# Release by default Turn on Debug with "-DCMAKE_BUILD_TYPE=Debug"
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package format="2">
<name>sophus</name>
<version>1.24.06</version>
<version>1.24.6</version>
<description>
C++ implementation of Lie Groups using Eigen.
</description>
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_cpp_tests_clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e # exit on error
mkdir build
cd build
pwd
cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
# Ubuntu builds via Github actions run on 2-core virtual machines
make -j2
ctest --output-on-failure
2 changes: 1 addition & 1 deletion scripts/run_cpp_tests_gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e # exit on error
mkdir build
cd build
pwd
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
# Ubuntu builds via Github actions run on 2-core virtual machines
make -j2
ctest --output-on-failure
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def main():
# logic and declaration, and simpler if you include description/version in a file.
setup(
name="sophus_pybind",
version="1.24.06",
version="1.24.6",
description="Sophus python API",
long_description="Python API for sophus library",
url="https://github.com/strasdat/sophus",
Expand Down
Loading