Add a default CompilerCapabilities.h

This file assumes that the compiler doesn't support anything. If building
without CMake, it will be used and if you want to enable things, the file
can be edited.

When using CMake, a proper CompilerCapabilites.h will be generated and
CMake will set the include path order correctly in order to source the
correct file.
This commit is contained in:
Matt Williams 2012-12-26 12:54:52 +00:00
parent 831689bd17
commit f5ea8878c2
9 changed files with 24 additions and 12 deletions

View File

@ -43,8 +43,8 @@ SOURCE_GROUP("Headers" FILES ${INC_FILES})
FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenGL REQUIRED)
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location) #Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_BINARY_DIR}/include ${GLEW_SOURCE_DIR}) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}) LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR})
#Build #Build

View File

@ -51,8 +51,8 @@ SOURCE_GROUP("Headers" FILES ${INC_FILES})
FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenGL REQUIRED)
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location) #Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_BINARY_DIR}/include ${GLEW_SOURCE_DIR}) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}) LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR})
#Build #Build

View File

@ -45,8 +45,8 @@ SOURCE_GROUP("Headers" FILES ${INC_FILES})
FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenGL REQUIRED)
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location) #Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_BINARY_DIR}/include ${GLEW_SOURCE_DIR}) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}) LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR})
#Build #Build

View File

@ -43,8 +43,8 @@ SOURCE_GROUP("Headers" FILES ${INC_FILES})
FIND_PACKAGE(OpenGL REQUIRED) FIND_PACKAGE(OpenGL REQUIRED)
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location) #Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_BINARY_DIR}/include ${GLEW_SOURCE_DIR}) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}) LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR})
#Build #Build

View File

@ -126,7 +126,7 @@ SOURCE_GROUP("Sources\\Impl" FILES ${IMPL_SRC_FILES})
SOURCE_GROUP("Headers\\Impl" FILES ${IMPL_INC_FILES}) SOURCE_GROUP("Headers\\Impl" FILES ${IMPL_INC_FILES})
#Tell CMake the paths #Tell CMake the paths
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include)
#Core #Core
#Build #Build

View File

@ -0,0 +1,12 @@
#ifndef __PolyVox_CompilerCapabilities_H__
#define __PolyVox_CompilerCapabilities_H__
//#undef HAS_CXX11_CONSTEXPR
//#undef HAS_CXX11_STATIC_ASSERT
//#undef HAS_CXX11_CSTDINT_H
//#undef HAS_CXX11_SHARED_PTR
#endif

View File

@ -42,7 +42,7 @@ SOURCE_GROUP("Sources" FILES ${UTIL_SRC_FILES})
SOURCE_GROUP("Headers" FILES ${UTIL_INC_FILES}) SOURCE_GROUP("Headers" FILES ${UTIL_INC_FILES})
#Tell CMake the paths #Tell CMake the paths
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_BINARY_DIR}/include) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include ${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include)
#There has to be a better way! #There has to be a better way!
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/debug ${PolyVoxCore_BINARY_DIR}/release ${PolyVoxCore_BINARY_DIR}) LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/debug ${PolyVoxCore_BINARY_DIR}/release ${PolyVoxCore_BINARY_DIR})

View File

@ -36,7 +36,7 @@ if(ENABLE_BINDINGS)
include(${SWIG_USE_FILE}) include(${SWIG_USE_FILE})
include_directories(${PYTHON_INCLUDE_PATH}) include_directories(${PYTHON_INCLUDE_PATH})
include_directories(${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include/PolyVoxCore ${PolyVoxCore_BINARY_DIR}/include) include_directories(${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include/PolyVoxCore)
link_directories(${PolyVoxCore_BINARY_DIR}) link_directories(${PolyVoxCore_BINARY_DIR})
set(CMAKE_SWIG_FLAGS "") set(CMAKE_SWIG_FLAGS "")

View File

@ -39,7 +39,7 @@ MACRO(CREATE_TEST headerfile sourcefile executablename)
SET_PROPERTY(TARGET ${executablename} PROPERTY FOLDER "Tests") SET_PROPERTY(TARGET ${executablename} PROPERTY FOLDER "Tests")
ENDMACRO(CREATE_TEST) ENDMACRO(CREATE_TEST)
INCLUDE_DIRECTORIES(${PolyVox_SOURCE_DIR}/PolyVoxCore/include ${PolyVoxCore_BINARY_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/include ${PolyVox_SOURCE_DIR}/PolyVoxCore/include ${CMAKE_CURRENT_BINARY_DIR})
REMOVE_DEFINITIONS(-DQT_GUI_LIB) #Make sure the tests don't link to the QtGui REMOVE_DEFINITIONS(-DQT_GUI_LIB) #Make sure the tests don't link to the QtGui
# Test Template. Copy and paste this template for consistant naming. # Test Template. Copy and paste this template for consistant naming.