Skip to content

Commit

Permalink
Remove several blanket include_directories.
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronrutherford committed Nov 2, 2023
1 parent 05a5b2e commit 508bd81
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,11 @@ endif(RESOLVE_USE_HIP)
configure_file(
${CMAKE_SOURCE_DIR}/resolve/resolve_defs.hpp.in
${CMAKE_BINARY_DIR}/resolve/resolve_defs.hpp)

# include build directory for Fortran name mangling header
# TODO - target based includes
include_directories(${CMAKE_BINARY_DIR})

install(
FILES ${CMAKE_BINARY_DIR}/resolve/resolve_defs.hpp
DESTINATION include/resolve
)

# TODO - fix this
include_directories(${CMAKE_SOURCE_DIR})

# Enable testing
enable_testing()
Expand Down
7 changes: 1 addition & 6 deletions resolve/cpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ set(ReSolve_CPU_HEADER_INSTALL

# First create dummy backend
add_library(resolve_backend_cpu SHARED ${ReSolve_CPU_SRC})
target_link_libraries(resolve_backend_cpu PRIVATE resolve_logger)

target_include_directories(resolve_backend_cpu INTERFACE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(resolve_backend_cpu PUBLIC resolve_logger)

# install include headers
install(FILES ${ReSolve_CPU_HEADER_INSTALL} DESTINATION include/resolve/cpu)
5 changes: 3 additions & 2 deletions resolve/utilities/logger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ set(Logger_HEADER_INSTALL
# Build shared library ReSolve
add_library(resolve_logger SHARED ${Logger_SRC})

target_include_directories(resolve_logger INTERFACE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
target_include_directories(resolve_logger PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
$<INSTALL_INTERFACE:include>
)

Expand Down
7 changes: 4 additions & 3 deletions resolve/workspace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ if(RESOLVE_USE_HIP)
target_link_libraries(resolve_workspace PUBLIC resolve_backend_hip)
endif(RESOLVE_USE_HIP)

target_include_directories(resolve_workspace INTERFACE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
target_include_directories(resolve_workspace PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
$<INSTALL_INTERFACE:include>
)

# install include headers
Expand Down

0 comments on commit 508bd81

Please sign in to comment.