Skip to content

Commit

Permalink
Update cmake paths to use 'project' counterpart
Browse files Browse the repository at this point in the history
  • Loading branch information
chapman39 committed Mar 13, 2024
1 parent 6161396 commit 8c14e17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit 8c14e17

Please sign in to comment.