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

Add -Wold-style-cast and fix related issues #682

Merged
merged 9 commits into from
Aug 21, 2024
2 changes: 2 additions & 0 deletions .github/ci_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export MAKEFLAGS="-j${CMAKE_BUILD_PARALLEL_LEVEL}"
# Set up the correct environment for the SYCL tests.
if [ "${PLATFORM_NAME}" = "SYCL" ]; then
if [ -f "/opt/intel/oneapi/setvars.sh" ]; then
OLD_CPATH=${CPATH}
source /opt/intel/oneapi/setvars.sh --include-intel-llvm
export CPATH=${OLD_CPATH}
fi
fi
1 change: 1 addition & 0 deletions cmake/traccc-compiler-options-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if( ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" ) OR
traccc_add_flag( CMAKE_CXX_FLAGS "-Wshadow" )
traccc_add_flag( CMAKE_CXX_FLAGS "-Wunused-local-typedefs" )
traccc_add_flag( CMAKE_CXX_FLAGS "-pedantic" )
traccc_add_flag( CMAKE_CXX_FLAGS "-Wold-style-cast" )
if(PROJECT_IS_TOP_LEVEL)
traccc_add_flag( CMAKE_CXX_FLAGS "-Wfloat-conversion" )
endif()
Expand Down
3 changes: 2 additions & 1 deletion core/include/traccc/seeding/spacepoint_binning_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ inline std::pair<detray::axis2::circular<>, detray::axis2::regular<>> get_axes(

scalar zBinSize = grid_config.cotThetaMax * grid_config.deltaRMax;
detray::dindex zBins = std::max(
1, (int)std::floor((grid_config.zMax - grid_config.zMin) / zBinSize));
1, static_cast<int>(
std::floor((grid_config.zMax - grid_config.zMin) / zBinSize)));

detray::axis2::regular m_z_axis{zBins, grid_config.zMin, grid_config.zMax,
mr};
Expand Down
7 changes: 7 additions & 0 deletions extern/tbb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ set( TBB_STRICT FALSE CACHE BOOL "Do not throw errors on compiler warnings" )

# Get it into the current directory.
FetchContent_MakeAvailable( TBB )

# Treat the TBB headers as "system headers", to avoid getting warnings from
# them.
get_target_property( _incDirs tbb INTERFACE_INCLUDE_DIRECTORIES )
target_include_directories( tbb
SYSTEM INTERFACE ${_incDirs} )
unset( _incDirs )
Loading