#############################################################################
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(CMakePushCheckState)
include(CheckCSourceCompiles)
include(CheckIncludeFile)
#
# We test sysctl() first and intentionally break the sysctl() test on QNX
# so that sysctl() is never used on QNX.
+ cmake_push_check_state()
check_include_file(sys/param.h HAVE_SYS_PARAM_H)
if(HAVE_SYS_PARAM_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_PARAM_H)
}
"
TUKLIB_CPUCORES_SYSCTL)
+ cmake_pop_check_state()
if(TUKLIB_CPUCORES_SYSCTL)
if(HAVE_SYS_PARAM_H)
set(TUKLIB_CPUCORES_DEFINITIONS
#############################################################################
include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(CMakePushCheckState)
include(CheckCSourceCompiles)
include(CheckIncludeFile)
endif()
# sysctl()
+ cmake_push_check_state()
check_include_file(sys/param.h HAVE_SYS_PARAM_H)
if(HAVE_SYS_PARAM_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_PARAM_H)
endif()
-
check_c_source_compiles("
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
}
"
TUKLIB_PHYSMEM_SYSCTL)
+ cmake_pop_check_state()
if(TUKLIB_PHYSMEM_SYSCTL)
if(HAVE_SYS_PARAM_H)
set(TUKLIB_PHYSMEM_DEFINITIONS