File: K3DWordSize.cmake

package info (click to toggle)
k3d 0.8.0.2-18
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 40,948 kB
  • sloc: cpp: 171,303; ansic: 24,129; xml: 6,995; python: 5,796; makefile: 671; sh: 22
file content (19 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Detect the word-size for the current platform ...
MESSAGE(STATUS "checking the width of std::vector<>::size_type for this platform")

TRY_RUN(
	K3D_PLATFORM_SIZE_TYPE
	K3D_PLATFORM_SIZE_TYPE_COMPILE
	${CMAKE_CURRENT_BINARY_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}/configuration/size_type.cpp)

MESSAGE(STATUS "  std::vector<>::size_type is ${K3D_PLATFORM_SIZE_TYPE} bits")

IF(K3D_PLATFORM_SIZE_TYPE EQUAL 32)
	SET(K3D_UINT_T_32_BITS 1)
ELSEIF(K3D_PLATFORM_SIZE_TYPE EQUAL 64)
	SET(K3D_UINT_T_64_BITS 1)
ELSE(K3D_PLATFORM_SIZE_TYPE EQUAL 32)
	MESSAGE(SEND_ERROR "Error detecting platform word-size.")
ENDIF(K3D_PLATFORM_SIZE_TYPE EQUAL 32)