Compare commits

...

6 Commits

4 changed files with 17 additions and 5 deletions

View File

@@ -4,15 +4,15 @@ function(add_common_library target)
set(oneValueArgs OUTPUT_NAME) set(oneValueArgs OUTPUT_NAME)
set(multiValueArgs SOURCES) set(multiValueArgs SOURCES)
cmake_parse_arguments(_LOCAL "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) cmake_parse_arguments(_PREFIX "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(_LOCAL_OUTPUT_NAME) if(_PREFIX_OUTPUT_NAME)
set(output_name ${_LOCAL_OUTPUT_NAME}) set(output_name ${_PREFIX_OUTPUT_NAME})
else() else()
set(output_name ${target}) set(output_name ${target})
endif() endif()
add_library(${target} OBJECT ${_LOCAL_SOURCES}) add_library(${target} OBJECT ${_PREFIX_SOURCES})
target_include_directories( target_include_directories(
${target} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> ${target} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> $<INSTALL_INTERFACE:include/${target}>) $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> $<INSTALL_INTERFACE:include/${target}>)

View File

@@ -1,4 +1,4 @@
include(cotire) include(cotire OPTIONAL)
if(COMMAND cotire) if(COMMAND cotire)
option(CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER "Enable precompiled headers" OFF) option(CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER "Enable precompiled headers" OFF)

View File

@@ -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()

View File

@@ -640,6 +640,7 @@ function (cotire_get_target_include_directories _config _language _target _inclu
endforeach() endforeach()
list (REMOVE_DUPLICATES _includeDirs) list (REMOVE_DUPLICATES _includeDirs)
list (REMOVE_DUPLICATES _systemIncludeDirs) list (REMOVE_DUPLICATES _systemIncludeDirs)
list (REMOVE_ITEM _systemIncludeDirs "/usr/include")
if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES) if (CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES)
list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES}) list (REMOVE_ITEM _includeDirs ${CMAKE_${_language}_IMPLICIT_INCLUDE_DIRECTORIES})
endif() endif()