-
Notifications
You must be signed in to change notification settings - Fork 558
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,162 changed files
with
67,255 additions
and
65,885 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,6 @@ __pycache__/ | |
*build/ | ||
*buildVS/ | ||
*bin/ | ||
*lib/ | ||
|
||
test/lib/ | ||
install/out/ | ||
*.tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
|
||
project("NumCpp" | ||
VERSION 2.1.0 | ||
DESCRIPTION "A Templatized Header Only C++ Implementation of the Python NumPy Library" | ||
HOMEPAGE_URL "https://github.com/dpilger26/NumCpp" | ||
LANGUAGES CXX | ||
) | ||
|
||
if (NUMCPP_TEST) | ||
add_subdirectory(test) | ||
endif() | ||
|
||
if (NUMCPP_EXAMPLES) | ||
add_subdirectory(examples) | ||
endif() | ||
|
||
include(GNUInstallDirs) | ||
add_library(${PROJECT_NAME} INTERFACE) | ||
target_include_directories(${PROJECT_NAME} INTERFACE | ||
$<BUILD_INTERFACE:${${PROJECT_NAME}_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
) | ||
|
||
target_compile_features(${PROJECT_NAME} INTERFACE $<INSTALL_INTERFACE:cxx_std_17>) | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
EXPORT ${PROJECT_NAME}_Targets | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) | ||
|
||
include(CMakePackageConfigHelpers) | ||
write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" | ||
VERSION ${PROJECT_VERSION} | ||
COMPATIBILITY SameMajorVersion) | ||
|
||
configure_package_config_file( | ||
"${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in" | ||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" | ||
INSTALL_DESTINATION | ||
${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake | ||
) | ||
|
||
install(EXPORT ${PROJECT_NAME}_Targets | ||
FILE ${PROJECT_NAME}Targets.cmake | ||
NAMESPACE ${PROJECT_NAME}:: | ||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake | ||
) | ||
|
||
install(FILES | ||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" | ||
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" | ||
DESTINATION | ||
${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake | ||
) | ||
|
||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# @PROJECT_NAME@Config.cmake | ||
# -------------------- | ||
# | ||
# @PROJECT_NAME@ cmake module. | ||
# This module sets the following variables in your project:: | ||
# | ||
# @PROJECT_NAME@_FOUND - true if @PROJECT_NAME@ found on the system | ||
# @PROJECT_NAME@_VERSION - @PROJECT_NAME@ version in format Major.Minor.Release | ||
# @PROJECT_NAME@_INCLUDE_DIR - Directory where @PROJECT_NAME@ headers are located. | ||
# | ||
# The following variables can be set to guide the search for this package:: | ||
# | ||
# @PROJECT_NAME@_DIR - CMake variable, set to directory containing this Config file | ||
# CMAKE_PREFIX_PATH - CMake variable, set to root directory of this package | ||
# PATH - environment variable, set to bin directory of this package | ||
# | ||
@PACKAGE_INIT@ | ||
|
||
if(NOT TARGET @PROJECT_NAME@::@PROJECT_NAME@) | ||
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") | ||
set_and_check(@PROJECT_NAME@_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") | ||
check_required_components("@PROJECT_NAME@") | ||
|
||
find_package(Boost REQUIRED) | ||
set_property(TARGET @PROJECT_NAME@::@PROJECT_NAME@ APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::headers) | ||
|
||
message(STATUS "Found NumCpp: ${@PROJECT_NAME@_INCLUDE_DIR} (found version ${@PROJECT_NAME@_VERSION})") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.