Skip to content

Commit e80cc07

Browse files
committed
CMake: Print the time_t size (32-bit/64-bit)
1 parent 7cd08fe commit e80cc07

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -458,11 +458,16 @@ include(CheckVariableExists)
458458
include(CheckTypeSize)
459459

460460
#
461-
# Get the size of a time_t, to know whether it's 32-bit or 64-bit.
461+
# Get the size of a time_t, to know whether it's 32-bit or 64-bit. Print it.
462462
#
463463
cmake_push_check_state()
464464
set(CMAKE_EXTRA_INCLUDE_FILES time.h)
465465
check_type_size("time_t" SIZEOF_TIME_T)
466+
if(SIZEOF_TIME_T EQUAL 4)
467+
message(STATUS "32-bit time_t")
468+
elseif(SIZEOF_TIME_T EQUAL 8)
469+
message(STATUS "64-bit time_t")
470+
endif()
466471
cmake_pop_check_state()
467472

468473
#

0 commit comments

Comments
 (0)