Skip to content

Commit 8274e94

Browse files
authored
Merge pull request #24 from astro-informatics/feature/conan-center-index
SO3 as conan-center-index package
2 parents ebb22c6 + c6103e9 commit 8274e94

25 files changed

+1185
-2209
lines changed

.github/workflows/conan.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ jobs:
119119
mv source-distribution/*.tar.gz wheel-*/*.whl dist
120120
121121
- name: Publish distribution 📦 to Test PyPI
122-
if: ${{ github.ref != 'refs/tags/v1.3.2' }}
122+
if: ${{ github.ref != 'refs/tags/v1.3.3' }}
123123
uses: pypa/gh-action-pypi-publish@master
124124
with:
125125
password: ${{ secrets.TEST_PYPI_TOKEN }}
126126
repository_url: https://test.pypi.org/legacy/
127127

128128
- name: Publish distribution 📦 to PyPI
129-
if: ${{ github.ref == 'refs/tags/v1.3.2' }}
129+
if: ${{ github.ref == 'refs/tags/v1.3.3' }}
130130
uses: pypa/gh-action-pypi-publish@master
131131
with:
132132
password: ${{ secrets.PYPI_TOKEN }}

CMakeLists.txt

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12)
22
project(
33
so3
4-
VERSION "1.3.2"
4+
VERSION "1.3.3"
55
DESCRIPTION "Fast and exact Wigner transforms"
66
HOMEPAGE_URL "http://astro-informatics.github.io/so3/"
77
LANGUAGES C)
@@ -11,30 +11,44 @@ option(conan_deps "Download ssht using conan" ON)
1111
if(NOT WIN32)
1212
option(fPIC "Enable position independent code" ON)
1313
endif()
14+
if(conan_deps AND download_ssht)
15+
message(
16+
FATAL_ERROR "conan_deps and download_ssht options are mutually exclusive.")
17+
endif()
1418

1519
if(NOT CMAKE_BUILD_TYPE)
1620
set(CMAKE_BUILD_TYPE "Debug")
1721
endif()
1822

19-
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
20-
if(conan_deps)
21-
include("conan_dependencies")
22-
set(SSHT_TARGET CONAN_PKG::ssht)
23+
if(tests)
24+
enable_testing()
25+
endif()
26+
if(conan_deps OR CONAN_EDITABLE_MODE)
27+
include("${PROJECT_SOURCE_DIR}/cmake/conan_dependencies.cmake")
28+
endif()
29+
if(EXISTS "${PROJECT_BINARY_DIR}/conan_paths.cmake")
30+
include("${PROJECT_BINARY_DIR}/conan_paths.cmake")
31+
elseif(EXISTS "${PROJECT_BINARY_DIR}/FindFFTW3.cmake")
32+
list(APPEND CMAKE_MODULE_PATH "${PROJECT_BINARY_DIR}")
2333
else()
24-
find_package(Ssht REQUIRED)
25-
set(SSHT_TARGET ssht)
34+
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
35+
endif()
36+
find_package(ssht REQUIRED)
37+
if(ssht_FOUND AND NOT TARGET ssht::ssht)
38+
message(FATAL_ERROR "NOT FOUND ${SSHT_LIBRARIES}")
2639
endif()
40+
find_package(FFTW3 REQUIRED)
41+
find_library(MATH_LIBRARY m)
2742

2843
add_subdirectory(src/c)
2944
if(tests)
30-
enable_testing()
31-
include("fetch_cmocka")
45+
include("${PROJECT_SOURCE_DIR}/cmake/fetch_cmocka.cmake")
3246
add_subdirectory(tests)
3347
endif()
3448

35-
if(NOT SKBUILD)
36-
include("exporting")
37-
else()
49+
if(NOT SKBUILD AND NOT CONAN_EXPORTED)
50+
include("${PROJECT_SOURCE_DIR}/cmake/exporting.cmake")
51+
elseif(NOT CONAN_EXPORTED)
3852
find_package(PythonExtensions REQUIRED)
3953
find_package(Cython REQUIRED)
4054
find_package(NumPy REQUIRED)

0 commit comments

Comments
 (0)