cleanup some warnings

This commit is contained in:
Stephen Birarda 2015-07-15 11:17:26 -07:00
parent ca3285b0e4
commit 8b5026a817
8 changed files with 51 additions and 17 deletions

View file

@ -105,10 +105,10 @@ if (APPLE)
# set where in the bundle to put the resources file # set where in the bundle to put the resources file
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/icon/${ICON_FILENAME} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/icon/${ICON_FILENAME} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(DISCOVERED_RESOURCES "") set(DISCOVERED_RESOURCES "")
# use the add_resources_to_os_x_bundle macro to recurse into resources # use the add_resources_to_os_x_bundle macro to recurse into resources
add_resources_to_os_x_bundle("${CMAKE_CURRENT_SOURCE_DIR}/resources") add_resources_to_os_x_bundle("${CMAKE_CURRENT_SOURCE_DIR}/resources")
# append the discovered resources to our list of interface sources # append the discovered resources to our list of interface sources
list(APPEND INTERFACE_SRCS ${DISCOVERED_RESOURCES}) list(APPEND INTERFACE_SRCS ${DISCOVERED_RESOURCES})
@ -136,12 +136,19 @@ target_include_directories(${TARGET_NAME} PRIVATE ${LIBOVR_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${LIBOVR_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${LIBOVR_LIBRARIES})
find_package(Bullet REQUIRED) find_package(Bullet REQUIRED)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
# perform the system include hack for OS X to ignore warnings
if (APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}")
else()
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
endif()
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
# link required hifi libraries # link required hifi libraries
link_hifi_libraries(shared octree environment gpu model render fbx networking entities avatars link_hifi_libraries(shared octree environment gpu model render fbx networking entities avatars
audio audio-client animation script-engine physics audio audio-client animation script-engine physics
render-utils entities-renderer ui auto-updater) render-utils entities-renderer ui auto-updater)
add_dependency_external_projects(sdl2) add_dependency_external_projects(sdl2)
@ -185,7 +192,7 @@ foreach(EXTERNAL ${OPTIONAL_EXTERNALS})
endforeach() endforeach()
# special OS X modifications for RtMidi library # special OS X modifications for RtMidi library
if (RTMIDI_FOUND AND NOT DISABLE_RTMIDI AND APPLE) if (RTMIDI_FOUND AND NOT DISABLE_RTMIDI AND APPLE)
find_library(CoreMIDI CoreMIDI) find_library(CoreMIDI CoreMIDI)
add_definitions(-D__MACOSX_CORE__) add_definitions(-D__MACOSX_CORE__)
target_link_libraries(${TARGET_NAME} ${CoreMIDI}) target_link_libraries(${TARGET_NAME} ${CoreMIDI})

View file

@ -38,14 +38,14 @@
** **
****************************************************************************/ ****************************************************************************/
#ifdef __GNUC__ #if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdouble-promotion" #pragma GCC diagnostic ignored "-Wdouble-promotion"
#endif #endif
#include <QtWidgets> #include <QtWidgets>
#ifdef __GNUC__ #if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif

View file

@ -9,7 +9,14 @@ target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
add_dependency_external_projects(bullet) add_dependency_external_projects(bullet)
find_package(Bullet REQUIRED) find_package(Bullet REQUIRED)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
# perform the system include hack for OS X to ignore warnings
if (APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}")
else()
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
endif()
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
add_dependency_external_projects(polyvox) add_dependency_external_projects(polyvox)

View file

@ -10,7 +10,14 @@ target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
add_dependency_external_projects(bullet) add_dependency_external_projects(bullet)
find_package(Bullet REQUIRED) find_package(Bullet REQUIRED)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
# perform the system include hack for OS X to ignore warnings
if (APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}")
else()
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
endif()
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
link_hifi_libraries(avatars shared octree gpu model fbx networking animation environment) link_hifi_libraries(avatars shared octree gpu model fbx networking animation environment)

View file

@ -10,7 +10,14 @@ target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
add_dependency_external_projects(bullet) add_dependency_external_projects(bullet)
find_package(Bullet REQUIRED) find_package(Bullet REQUIRED)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
# perform the system include hack for OS X to ignore warnings
if (APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}")
else()
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
endif()
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
link_hifi_libraries(shared fbx entities) link_hifi_libraries(shared fbx entities)

View file

@ -18,7 +18,7 @@
#include <QBuffer> #include <QBuffer>
#include <QFile> #include <QFile>
#ifdef __GNUC__ #if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdouble-promotion" #pragma GCC diagnostic ignored "-Wdouble-promotion"
#endif #endif
@ -29,7 +29,7 @@
#include <QOpenGLVertexArrayObject> #include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer> #include <QOpenGLBuffer>
#ifdef __GNUC__ #if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif

View file

@ -109,7 +109,7 @@ void testPropertyFlags(uint32_t value) {
} }
QByteArray encoded = original.encode(); QByteArray encoded = original.encode();
#ifndef QT_NO_DEBUG #ifndef QT_NO_DEBUG
auto originalSize = encoded.size(); int originalSize = encoded.size();
#endif #endif
for (size_t i = 0; i < enumSize; ++i) { for (size_t i = 0; i < enumSize; ++i) {
encoded.append(qrand()); encoded.append(qrand());
@ -123,7 +123,7 @@ void testPropertyFlags(uint32_t value) {
{ {
#ifndef QT_NO_DEBUG #ifndef QT_NO_DEBUG
auto decodeSize = decodeNew.decode((const uint8_t*)encoded.data(), encoded.size()); int decodeSize = decodeNew.decode((const uint8_t*)encoded.data(), encoded.size());
#endif #endif
Q_ASSERT(originalSize == decodeSize); Q_ASSERT(originalSize == decodeSize);
Q_ASSERT(decodeNew == original); Q_ASSERT(decodeNew == original);

View file

@ -8,11 +8,17 @@ macro (SETUP_TESTCASE_DEPENDENCIES)
add_dependency_external_projects(bullet) add_dependency_external_projects(bullet)
find_package(Bullet REQUIRED) find_package(Bullet REQUIRED)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES}) target_link_libraries(${TARGET_NAME} ${BULLET_LIBRARIES})
# perform the system include hack for OS X to ignore warnings
if (APPLE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${BULLET_INCLUDE_DIRS}")
else()
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BULLET_INCLUDE_DIRS})
endif()
link_hifi_libraries(shared physics) link_hifi_libraries(shared physics)
copy_dlls_beside_windows_executable() copy_dlls_beside_windows_executable()
endmacro () endmacro ()
setup_hifi_testcase(Script) setup_hifi_testcase(Script)