Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
drexlerd committed Jan 12, 2024
1 parent 200f369 commit e8fdc23
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 40 deletions.
23 changes: 1 addition & 22 deletions Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,7 @@ include("configure_boost")
##############################################################

# Add lokis dependencies
# configure_dependencies()
# We installed the dependencies into the subdirectories under the install prefix.
# Hence must append them to the single cmake_prefix_path.
message("Configure dependencies of Loki:")
message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
list(LENGTH CMAKE_PREFIX_PATH PREFIX_PATH_COUNT)
if(PREFIX_PATH_COUNT GREATER 1)
message(FATAL_ERROR "Only one prefix path is allowed. Found multiple paths in CMAKE_PREFIX_PATH. Please add dependencies to the CMake Superbuild.")
endif()
list(GET CMAKE_PREFIX_PATH 0 SINGLE_CMAKE_PREFIX_PATH)

list(APPEND MODIFIED_CMAKE_PREFIX_PATH
"${SINGLE_CMAKE_PREFIX_PATH}/benchmark"
"${SINGLE_CMAKE_PREFIX_PATH}/boost"
"${SINGLE_CMAKE_PREFIX_PATH}/googletest")
message(${MODIFIED_CMAKE_PREFIX_PATH})
set(CMAKE_PREFIX_PATH ${MODIFIED_CMAKE_PREFIX_PATH})
message(STATUS "MODIFIED_CMAKE_PREFIX_PATH:")
foreach(CMAKE_PREFIX_PATH_ARG ${CMAKE_PREFIX_PATH})
message(STATUS "-- ${CMAKE_PREFIX_PATH_ARG}")
endforeach()
# set(CMAKE_FIND_DEBUG_MODE ON)
configure_dependencies()

# Boost
# Find Boost headers only according to https://cmake.org/cmake/help/latest/module/FindBoost.html
Expand Down
36 changes: 18 additions & 18 deletions cmake/configure_dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
macro(configure_dependencies)
# We installed the dependencies into the subdirectories under the install prefix.
# Hence must append them to the single cmake_prefix_path.
message("Configure dependencies of Loki:")
message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
list(LENGTH CMAKE_PREFIX_PATH PREFIX_PATH_COUNT)
if(PREFIX_PATH_COUNT GREATER 1)
message(FATAL_ERROR "Only one prefix path is allowed. Found multiple paths in CMAKE_PREFIX_PATH. Please add dependencies to the CMake Superbuild.")
endif()
# Hence must append them to the single cmake_prefix_path.
message("Configure dependencies of Loki:")
message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
list(LENGTH CMAKE_PREFIX_PATH PREFIX_PATH_COUNT)
if(PREFIX_PATH_COUNT GREATER 1)
message(FATAL_ERROR "Only one prefix path is allowed. Found multiple paths in CMAKE_PREFIX_PATH. Please add dependencies to the CMake Superbuild.")
endif()

list(APPEND MODIFIED_CMAKE_PREFIX_PATH
"${CMAKE_PREFIX_PATH}/benchmark"
"${CMAKE_PREFIX_PATH}/boost"
"${CMAKE_PREFIX_PATH}/googletest")
message(${MODIFIED_CMAKE_PREFIX_PATH})
set(CMAKE_PREFIX_PATH ${MODIFIED_CMAKE_PREFIX_PATH})
message(STATUS "MODIFIED_CMAKE_PREFIX_PATH:")
foreach(CMAKE_PREFIX_PATH_ARG ${CMAKE_PREFIX_PATH})
message(STATUS "-- ${CMAKE_PREFIX_PATH_ARG}")
endforeach()
# set(CMAKE_FIND_DEBUG_MODE ON)
list(APPEND MODIFIED_CMAKE_PREFIX_PATH
"${CMAKE_PREFIX_PATH}/benchmark"
"${CMAKE_PREFIX_PATH}/boost"
"${CMAKE_PREFIX_PATH}/googletest")
message(${MODIFIED_CMAKE_PREFIX_PATH})
set(CMAKE_PREFIX_PATH ${MODIFIED_CMAKE_PREFIX_PATH})
message(STATUS "MODIFIED_CMAKE_PREFIX_PATH:")
foreach(CMAKE_PREFIX_PATH_ARG ${CMAKE_PREFIX_PATH})
message(STATUS "-- ${CMAKE_PREFIX_PATH_ARG}")
endforeach()
# set(CMAKE_FIND_DEBUG_MODE ON)
endmacro()

0 comments on commit e8fdc23

Please sign in to comment.