Improved disabling auto detection

master
Christophe Riccio ago%!(EXTRA string=7 years)
parent b1c2cc64fd
commit de4dbc5662
  1. 6
      CMakeLists.txt
  2. 4
      glm/detail/setup.hpp
  3. 4
      glm/simd/platform.h
  4. 12
      manual.md
  5. 13
      test/core/core_setup_platform_unknown.cpp

@ -58,6 +58,12 @@ endif()
option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF)
option(GLM_DISABLE_AUTO_DETECTION "Enable language extensions" OFF)
if(GLM_DISABLE_AUTO_DETECTION)
add_definitions(-DGLM_FORCE_PLATFORM_UNKNOWN -DGLM_FORCE_COMPILER_UNKNOWN -DGLM_FORCE_ARCH_UNKNOWN -DGLM_FORCE_CXX_UNKNOWN)
endif()
if(GLM_TEST_ENABLE_LANG_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS ON)
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))

@ -80,7 +80,9 @@
# define GLM_LANG_EXT 0
#endif
#if defined(GLM_FORCE_CXX2A)
#if (defined(GLM_FORCE_CXX_UNKNOWN))
# define GLM_LANG 0
#elif defined(GLM_FORCE_CXX2A)
# define GLM_LANG (GLM_LANG_CXX2A | GLM_LANG_EXT)
# define GLM_LANG_STL11_FORCED
#elif defined(GLM_FORCE_CXX17)

@ -251,7 +251,9 @@
#define GLM_ARCH_MIPS (GLM_ARCH_MIPS_BIT)
#define GLM_ARCH_PPC (GLM_ARCH_PPC_BIT)
#if defined(GLM_FORCE_PURE) || defined(GLM_FORCE_XYZW_ONLY)
#ifdef GLM_FORCE_ARCH_UNKNOWN
# define GLM_ARCH GLM_ARCH_UNKNOWN
#elif defined(GLM_FORCE_PURE) || defined(GLM_FORCE_XYZW_ONLY)
# if defined(__x86_64__) || defined(_M_X64) || defined(_M_IX86) || defined(__i386__)
# define GLM_ARCH (GLM_ARCH_X86)
# elif defined(__arm__ ) || defined(_M_ARM)

@ -293,6 +293,18 @@ The following subsections describe each configurations and defines.
TODO
### <a name="section2_3"></a> 2.3. GLM\_FORCE\_COMPILER\_UNKNOWN: Force GLM to no detect the build compiler
TODO
### <a name="section2_4"></a> 2.4. GLM\_FORCE\_ARCH\_UNKNOWN: Force GLM to no detect the build architecture
TODO
### <a name="section2_5"></a> 2.5. GLM\_FORCE\_CXX\_UNKNOWN: Force GLM to no detect the C++ standard
TODO
### <a name="section2_3"></a> 2.3. GLM\_FORCE\_CXX**: C++ language detection
GLM will automatically take advantage of compilers’ language extensions when enabled. To increase cross platform compatibility and to avoid compiler extensions, a programmer can define GLM\_FORCE\_CXX98 before

@ -1,4 +1,15 @@
#define GLM_FORCE_PLATFORM_UNKNOWN
#ifndef GLM_FORCE_PLATFORM_UNKNOWN
# define GLM_FORCE_PLATFORM_UNKNOWN
#endif
#ifndef GLM_FORCE_COMPILER_UNKNOWN
# define GLM_FORCE_COMPILER_UNKNOWN
#endif
#ifndef GLM_FORCE_ARCH_UNKNOWN
# define GLM_FORCE_ARCH_UNKNOWN
#endif
#ifndef GLM_FORCE_CXX_UNKNOWN
# define GLM_FORCE_CXX_UNKNOWN
#endif
#include <glm/glm.hpp>
#include <glm/ext.hpp>

Loading…
Cancel
Save