2017-01-18 21:43:58 +11:00
|
|
|
if (NOT AUTOCONF_DEFINES)
|
|
|
|
add_definitions(-DPACKAGE="${PROJECT_NAME}")
|
|
|
|
add_definitions(-DPACKAGE_VERSION="${PROJECT_VERSION}")
|
|
|
|
add_definitions(-DPACKAGE_NAME="${PROJECT_NAME}")
|
|
|
|
add_definitions(-DPACKAGE_STRING="${PROJECT_NAME} ${PROJECT_VERSION}")
|
|
|
|
|
|
|
|
set (AUTOCONF_DEFINES 1)
|
|
|
|
endif()
|
|
|
|
|
2017-07-04 14:20:00 +10:00
|
|
|
# Unconditionally link pthreads in. Some projects won't need it, but most
|
|
|
|
# will in some capacity if only through implied dependency (like thread pools).
|
|
|
|
set (THREADS_PREFER_PTHREAD_FLAG ON)
|
|
|
|
find_package (Threads REQUIRED)
|
|
|
|
link_libraries (Threads::Threads)
|
|
|
|
|
2019-06-18 11:28:17 +10:00
|
|
|
# Set the variable NC_CMAKE_BASE to the root path of this collection of cmake
|
|
|
|
# files so that we can reliably point to soure files contained therein
|
|
|
|
# (eg, the search_lib.cpp tests and friends).
|
|
|
|
foreach (d ${CMAKE_MODULE_PATH})
|
|
|
|
message (STATUS testing nc_cmake_base at "${d}")
|
|
|
|
if (EXISTS "${d}/nc.cmake")
|
|
|
|
set (NC_CMAKE_BASE "${d}")
|
|
|
|
message (STATUS testing nc_cmake_base at "${d} - found")
|
|
|
|
break()
|
|
|
|
else ()
|
|
|
|
message (STATUS testing nc_cmake_base at "${d} - not found")
|
|
|
|
endif ()
|
|
|
|
endforeach()
|
|
|
|
|
2017-01-18 21:43:58 +11:00
|
|
|
include (nc_cxx)
|
2018-07-04 16:25:05 +10:00
|
|
|
include (nc_sanitizer)
|
2017-01-18 21:43:58 +11:00
|
|
|
include (nc_platform)
|
|
|
|
include (nc_optimisation)
|
|
|
|
include (nc_warnings)
|