Commit bfbc57f4 authored by Dave Moxey's avatar Dave Moxey

Merge branch 'fix/warnings-el-capitan' into 'master'

Fix warnings issued by clang on OSX El Capitan.

See merge request !1091
parents e166b0d4 1e79ca0d
Pipeline #1146 passed with stages
in 7 minutes and 38 seconds
......@@ -88,6 +88,13 @@ IF (NEKTAR_BUILD_PYTHON)
# If we can't find it, pull it from git and compile it
IF (NOT BOOST_NUMPY_LIB)
INCLUDE(ExternalProject)
IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
SET(WARNING_FLAGS "-Wno-cpp")
ENDIF()
IF (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
SET(WARNING_FLAGS "-Wno-#warnings")
ENDIF()
EXTERNALPROJECT_ADD(
boost-numpy
PREFIX ${TPSRC}
......@@ -101,7 +108,7 @@ IF (NEKTAR_BUILD_PYTHON)
INSTALL_DIR ${TPDIST}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-G ${CMAKE_GENERATOR} -DCMAKE_INSTALL_PREFIX:PATH=${TPDIST}
-DCMAKE_CXX_FLAGS="-Wno-cpp"
-DCMAKE_CXX_FLAGS=${WARNING_FLAGS}
-DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DLIBRARY_TYPE=STATIC
${TPSRC}/boost-numpy
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
PROJECT(libccmio)
# compile in Release mode by default
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
......
......@@ -421,7 +421,7 @@ std::array<NekDouble, 6> Geometry::GetBoundingBox()
}
// Return bounding box
return { min[0], min[1], min[2], max[0], max[1], max[2] };
return {{ min[0], min[1], min[2], max[0], max[1], max[2] }};
}
/**
......
......@@ -187,7 +187,7 @@ namespace Nektar
// chiRoe and kappaRoe (eq 66)
NekDouble chiRoe, kappaRoe;
NekDouble fac = D - deltaP*deltaRho;
if( abs(fac) > NekConstants::kNekZeroTol)
if( std::abs(fac) > NekConstants::kNekZeroTol)
{
chiRoe = (D*avgChi + s*s*deltaRho*dP) / fac;
kappaRoe = D*avgKappa / fac;
......
......@@ -48,13 +48,13 @@ ADD_DEPENDENCIES(Tester boost tinyxml-2.6.2)
IF( ${CMAKE_SYSTEM} MATCHES "Linux.*")
TARGET_LINK_LIBRARIES(Tester optimized rt debug rt)
SET_PROPERTY(TARGET Tester APPEND_STRING PROPERTY COMPILE_FLAGS " -pthread")
SET_PROPERTY(TARGET Tester APPEND_STRING PROPERTY LINK_FLAGS " -pthread")
ENDIF()
IF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
SET_TARGET_PROPERTIES(Tester
PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup -Wl,-rpath,${Boost_LIBRARY_DIRS}")
SET_PROPERTY(TARGET Tester APPEND_STRING PROPERTY COMPILE_FLAGS " -pthread")
SET_PROPERTY(TARGET Tester APPEND_STRING PROPERTY LINK_FLAGS " -pthread")
ENDIF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
SET_TARGET_PROPERTIES(Tester
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment