diff --git a/CMLibCommonLibraryTarget.cmake b/CMLibCommonLibraryTarget.cmake index e032738..4748e8a 100644 --- a/CMLibCommonLibraryTarget.cmake +++ b/CMLibCommonLibraryTarget.cmake @@ -4,15 +4,15 @@ function(add_common_library target) set(oneValueArgs OUTPUT_NAME) set(multiValueArgs SOURCES) - cmake_parse_arguments(_LOCAL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + cmake_parse_arguments(_PREFIX "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - if(_LOCAL_OUTPUT_NAME) - set(output_name ${_LOCAL_OUTPUT_NAME}) + if(_PREFIX_OUTPUT_NAME) + set(output_name ${_PREFIX_OUTPUT_NAME}) else() set(output_name ${target}) endif() - add_library(${target} OBJECT ${_LOCAL_SOURCES}) + add_library(${target} OBJECT ${_PREFIX_SOURCES}) target_include_directories( ${target} PUBLIC $ $ $) diff --git a/CMLibExternalProject.cmake b/CMLibExternalProject.cmake index e223d20..4ba9bdc 100644 --- a/CMLibExternalProject.cmake +++ b/CMLibExternalProject.cmake @@ -4,6 +4,10 @@ if(CMAKE_BUILD_TYPE) list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) endif() +if(CMLIB_MAIN_DIR) + list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMLIB_MAIN_DIR=${CMLIB_MAIN_DIR}) +endif() + if(CMAKE_C_COMPILER) list(APPEND CMLIB_EXT_PROJ_DEFAULT_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}) endif() diff --git a/CMLibHighPrecisionMath.cmake b/CMLibHighPrecisionMath.cmake new file mode 100644 index 0000000..0480251 --- /dev/null +++ b/CMLibHighPrecisionMath.cmake @@ -0,0 +1,11 @@ +find_package(Quadmath) +if(QUADMATH_FOUND) + add_definitions(-DHAVE_QUADMATH=1) +else() + find_package(MPFR) + if(MPFR_FOUND) + find_package(MPFRCppThirdparty) + else() + message(FATAL_ERROR "Nor Quadmath, nor MPFR found.") + endif() +endif() diff --git a/thirdparty/cotire.cmake b/thirdparty/cotire.cmake index 2f970ca..23d5131 100644 --- a/thirdparty/cotire.cmake +++ b/thirdparty/cotire.cmake @@ -3707,7 +3707,7 @@ if (CMAKE_SCRIPT_MODE_FILE) COMPILER_VERSION "${CMAKE_${COTIRE_TARGET_LANGUAGE}_COMPILER_VERSION}" LANGUAGE "${COTIRE_TARGET_LANGUAGE}" IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}" - INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH} + INCLUDE_PATH "${COTIRE_TARGET_INCLUDE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_INCLUDE_PATH}" IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}" INCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH} INCLUDE_DIRECTORIES ${_includeDirs} @@ -3808,6 +3808,9 @@ else() set (COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH "" CACHE STRING "Ignore headers from these directories when generating the prefix header.") + set (COTIRE_ADDITIONAL_PREFIX_HEADER_INCLUDE_PATH "" CACHE STRING + "Include headers from these directories when generating the prefix header.") + set (COTIRE_UNITY_SOURCE_EXCLUDE_EXTENSIONS "m;mm" CACHE STRING "Ignore sources with the listed file extensions from the generated unity source.") @@ -3884,6 +3887,15 @@ else() "If not defined, defaults to empty list." ) + define_property( + CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_INCLUDE_PATH" + BRIEF_DOCS "Include headers from these directories when generating the prefix header." + FULL_DOCS + "The variable can be set to a semicolon separated list of include directories." + "If a header file is found in one of these directories or sub-directories, it will be included in the generated prefix header." + "If not defined, defaults to empty list." + ) + define_property( CACHED_VARIABLE PROPERTY "COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS" BRIEF_DOCS "Ignore includes with the listed file extensions from the generated prefix header."