|
1 | 1 | if(FINUFFT_USE_CPU) |
2 | | - if (WIN32) |
3 | | - install(TARGETS finufft LIBRARY DESTINATION finufft RUNTIME DESTINATION finufft) |
4 | | - else () |
5 | | - install(TARGETS finufft LIBRARY DESTINATION finufft) |
6 | | - endif () |
| 2 | + if(WIN32) |
| 3 | + install( |
| 4 | + TARGETS finufft |
| 5 | + LIBRARY DESTINATION finufft |
| 6 | + RUNTIME DESTINATION finufft) |
| 7 | + else() |
| 8 | + install(TARGETS finufft LIBRARY DESTINATION finufft) |
| 9 | + endif() |
7 | 10 | endif() |
8 | 11 |
|
9 | 12 | if(FINUFFT_USE_CUDA) |
10 | | - install(TARGETS cufinufft LIBRARY DESTINATION cufinufft) |
| 13 | + install(TARGETS cufinufft LIBRARY DESTINATION cufinufft) |
| 14 | +endif() |
| 15 | + |
| 16 | +# Warn if the user invokes CMake directly |
| 17 | +if(NOT SKBUILD) |
| 18 | + message( |
| 19 | + WARNING |
| 20 | + "\ |
| 21 | + This CMake file is meant to be executed using 'scikit-build-core'. |
| 22 | + Running it directly will almost certainly not produce the desired |
| 23 | + result. If you are a user trying to install this package, use the |
| 24 | + command below, which will install all necessary build dependencies, |
| 25 | + compile the package in an isolated environment, and then install it. |
| 26 | + ===================================================================== |
| 27 | + $ pip install python/finufft |
| 28 | + or |
| 29 | + $ pip install python/cufinufft |
| 30 | + ===================================================================== |
| 31 | + If you are a software developer, and this is your own package, then |
| 32 | + it is usually much more efficient to install the build dependencies |
| 33 | + in your environment once and use the following command that avoids |
| 34 | + a costly creation of a new virtual environment at every compilation: |
| 35 | + ===================================================================== |
| 36 | + $ pip install finufft scikit-build-core[pyproject] |
| 37 | + $ pip install --no-build-isolation -ve . |
| 38 | + ===================================================================== |
| 39 | + You may optionally add -Ceditable.rebuild=true to auto-rebuild when |
| 40 | + the package is imported. Otherwise, you need to rerun the above |
| 41 | + after editing C++ files.") |
11 | 42 | endif() |
0 commit comments