From b42e2b36ee66afe38298a51a18a2aba0936708db Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Fri, 12 Feb 2016 11:45:46 +0100 Subject: [PATCH] Fix Clang compiler error and warnings --- CMakeLists.txt | 6 ++++++ src/gmio_core/internal/vecgeom_utils.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42ac85b..4424466 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -240,6 +240,12 @@ if(CMAKE_C_COMPILER_IS_GCC_COMPATIBLE) set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() +# Specific flags for Clang +if(CMAKE_COMPILER_IS_CLANG) + # Clang on apple-darwin13.4.0 wrongly reports many unused functions + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") +endif() + # Specific flags for Visual C++ if(MSVC) # Treat all files a C source files diff --git a/src/gmio_core/internal/vecgeom_utils.h b/src/gmio_core/internal/vecgeom_utils.h index e21a1e2..99f59e0 100644 --- a/src/gmio_core/internal/vecgeom_utils.h +++ b/src/gmio_core/internal/vecgeom_utils.h @@ -35,6 +35,8 @@ GMIO_INLINE void gmio_cross_product_f64( * Implementation */ +#include + void gmio_cross_product_f32( float ux, float uy, float uz, float vx, float vy, float vz,