Skip to content

Commit

Permalink
update ci wf
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Rizzi committed Oct 14, 2024
1 parent 982d96b commit 13032ba
Showing 1 changed file with 11 additions and 42 deletions.
53 changes: 11 additions & 42 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ project(pressio C CXX)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(colors)

#=====================================================================
# pull in pressio-ops and read macros
#=====================================================================
if(PRESSIO_OPS_INCLUDE_DIR)
Expand All @@ -28,7 +27,6 @@ else()
set(PRESSIO_OPS_INCLUDE_DIR ${pressio-ops_SOURCE_DIR}/include)
endif()

#=====================================================================
# versioning
#=====================================================================
# adapted from Eigen
Expand All @@ -43,7 +41,6 @@ set(PRESSIO_PATCH_VERSION "${CMAKE_MATCH_1}")
set(PRESSIO_VERSION_NUMBER ${PRESSIO_MAJOR_VERSION}.${PRESSIO_MINOR_VERSION}.${PRESSIO_PATCH_VERSION})
message("${Magenta}>> PRESSIO: version = ${PRESSIO_VERSION_NUMBER} ${ColourReset}")

#=====================================================================
# c++ standard
#=====================================================================
if (NOT CMAKE_CXX_STANDARD)
Expand All @@ -61,53 +58,25 @@ if(CMAKE_CXX_STANDARD STREQUAL "17"
endif()
endif()

################################################################################

# install headers
#=====================================================================
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)

install(
DIRECTORY include/pressio
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

add_library(pressio INTERFACE)

target_include_directories(
pressio INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include;${PRESSIO_OPS_INCLUDE_DIR}>"
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR};>
)

# install(
# TARGETS pressio
# EXPORT pressioTargets
# INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# install(
# EXPORT pressioTargets
# FILE pressioTargets.cmake
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pressio)
# export(
# TARGETS pressio
# FILE pressioTargets.cmake)

# configure_package_config_file(
# ${CMAKE_CURRENT_SOURCE_DIR}/cmake/pressioConfig.cmake.in
# ${CMAKE_CURRENT_BINARY_DIR}/pressioConfig.cmake
# INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pressio)

# write_basic_package_version_file (pressioConfigVersion.cmake
# VERSION ${PRESSIO_VERSION_NUMBER}
# COMPATIBILITY SameMajorVersion
# ARCH_INDEPENDENT)

# install(FILES
# ${CMAKE_CURRENT_BINARY_DIR}/pressioConfig.cmake
# ${CMAKE_CURRENT_BINARY_DIR}/pressioConfigVersion.cmake
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pressio)

################################################################################

# tests
#=====================================================================
if(PRESSIO_ENABLE_TESTS)
add_library(pressio INTERFACE)

target_include_directories(
pressio INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include;${PRESSIO_OPS_INCLUDE_DIR}>"
)

enable_testing()
add_subdirectory(tests)
endif()

0 comments on commit 13032ba

Please sign in to comment.