Skip to content

Commit d59d287

Browse files
authored
updated cmake (#619)
1 parent 7d17c87 commit d59d287

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

python/CMakeLists.txt

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,42 @@
11
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()
710
endif()
811

912
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.")
1142
endif()

0 commit comments

Comments
 (0)