Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cmake paths be relative to hiop project #684

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ if(HIOP_USE_MPI)
set(HIOP_EXTRA_MPI_FLAGS "" CACHE STRING "Extra arguments to mpiexec when running tests")
endif(HIOP_USE_MPI)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

target_compile_features(hiop_options
INTERFACE
Expand Down Expand Up @@ -393,11 +393,11 @@ endif()

# The binary dir is already a global include directory
configure_file(
"${CMAKE_SOURCE_DIR}/src/Interface/hiop_defs.hpp.in"
"${CMAKE_BINARY_DIR}/hiop_defs.hpp")
"${PROJECT_SOURCE_DIR}/src/Interface/hiop_defs.hpp.in"
"${PROJECT_BINARY_DIR}/hiop_defs.hpp")

# include build directory for Fortran name mangling header
include_directories(${CMAKE_BINARY_DIR})
include_directories(${PROJECT_BINARY_DIR})

include_directories(src/Interface)
include_directories(src/ExecBackends)
Expand All @@ -422,7 +422,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
endif("${CMAKE_BUILD_TYPE}" STREQUAL "")

if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/_dist-${CMAKE_BUILD_TYPE}")
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/_dist-${CMAKE_BUILD_TYPE}")
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)

##########################################################
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ add_subdirectory(Utils)

# Interface headers not already picked up by another subdirectory
set(hiop_INTERFACE_HEADERS
${CMAKE_BINARY_DIR}/hiop_defs.hpp
${CMAKE_BINARY_DIR}/FortranCInterface.hpp
${PROJECT_BINARY_DIR}/hiop_defs.hpp
${PROJECT_BINARY_DIR}/FortranCInterface.hpp
)

install(
Expand Down
Loading