mirror of
https://github.com/TREX-CoE/trexio.git
synced 2024-08-25 06:31:43 +02:00
[CMake] add minor support for pthreads and stdint
This commit is contained in:
parent
5db1de3d3c
commit
2a9cfb3fa4
@ -49,7 +49,8 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/.git/config")
|
||||
# replace placeholders in the templace config.h.in file to produce config.h
|
||||
# config.h is needed to insert TREXIO_PACKAGE_VERSION and TREXIO_GIT_HASH into trexio.h
|
||||
configure_file(${CMAKE_SOURCE_DIR}/include/cmake_config.h.in
|
||||
${CMAKE_SOURCE_DIR}/include/config.h)
|
||||
${CMAKE_SOURCE_DIR}/include/config.h
|
||||
@ONLY)
|
||||
endif()
|
||||
|
||||
# Set directories to be included at build time.
|
||||
|
@ -1,4 +1,17 @@
|
||||
|
||||
# ============= THREADS SUPPORT ==============
|
||||
|
||||
# the two options below add preference for the pthread library over other system-wide threads implementations
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
# find thread library
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# ============= STDINT SUPPORT ===============
|
||||
|
||||
include(CheckIncludeFile)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
|
||||
# ========= DEFINE TREXIO C LIBRARY =========
|
||||
|
||||
# Set a list of TREXIO source and header files that are always compiled.
|
||||
|
Loading…
Reference in New Issue
Block a user