Skip to content

Commit

Permalink
Consistently linking all libraries with SYSTEM attribute (lsils#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa authored May 18, 2021
1 parent ee65b56 commit ae52625
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ endif()

if (NOT TARGET fmt)
add_library(fmt INTERFACE) # v6.3.0
target_include_directories(fmt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
target_include_directories(fmt SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
target_compile_definitions(fmt INTERFACE FMT_HEADER_ONLY)
endif()

Expand All @@ -16,18 +16,18 @@ endif()

if (NOT TARGET range)
add_library(rang INTERFACE)
target_include_directories(rang INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/rang)
target_include_directories(rang SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/rang)
endif()

if (NOT TARGET lorina)
add_library(lorina INTERFACE) # v0.1
target_include_directories(lorina INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/lorina)
target_include_directories(lorina SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/lorina)
target_link_libraries(lorina INTERFACE rang fmt)
endif()

if (NOT TARGET json)
add_library(json INTERFACE) # v3.5.0
target_include_directories(json INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/json)
target_include_directories(json SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/json)
endif()

if (NOT TARGET percy)
Expand Down Expand Up @@ -59,7 +59,7 @@ if (NOT TARGET bill)
set(BILL_Z3_INCLUDE_PATH "" CACHE PATH "Path to Z3 includes, e.g., z3++.h")
set(BILL_Z3_LIBRARY_PATH "" CACHE PATH "Path to Z3 library, e.g., libz3.a")
if(NOT "${BILL_Z3_INCLUDE_PATH}" STREQUAL "")
target_include_directories(bill INTERFACE ${BILL_Z3_INCLUDE_PATH})
target_include_directories(bill SYSTEM INTERFACE ${BILL_Z3_INCLUDE_PATH})
endif()
if(NOT "${BILL_Z3_LIBRARY_PATH}" STREQUAL "")
target_link_directories(bill INTERFACE ${BILL_Z3_LIBRARY_PATH})
Expand All @@ -74,7 +74,7 @@ endif()

if (NOT TARGET abcresub)
add_library(abcresub INTERFACE)
target_include_directories(abcresub INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/abcresub)
target_include_directories(abcresub SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/abcresub)
endif()

if (NOT TARGET libabcesop)
Expand All @@ -85,6 +85,6 @@ endif()
if (ENABLE_MATPLOTLIB AND NOT TARGET matplot)
find_package(Python3 COMPONENTS Development NumPy)
add_library(matplot INTERFACE)
target_include_directories(matplot INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/matplot/ ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS})
target_include_directories(matplot SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/matplot/ ${Python3_INCLUDE_DIRS} ${Python3_NumPy_INCLUDE_DIRS})
target_link_libraries(matplot INTERFACE Python3::Python Python3::NumPy)
endif()

0 comments on commit ae52625

Please sign in to comment.