Skip to content

Commit

Permalink
Move headers to include/ssht
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavezac committed Oct 16, 2020
1 parent 0202d1c commit e3e1d5f
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 35 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Expand Up @@ -2,5 +2,6 @@ include CMakeLists.txt
include setup.py setup.cfg pyproject.toml
include COPYRIGHT.txt LICENSE.md README.md
include cmake/*.cmake
recursive-include src/c *.c *.h CMakeLists.txt
recursive-include src/c *.c CMakeLists.txt
recursive-include include/ssht *.h CMakeLists.txt
recursive-include src/pyssht .py *.pyx *.md CMakeLists.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 14 additions & 12 deletions src/c/CMakeLists.txt
Expand Up @@ -2,11 +2,13 @@ add_library(ssht STATIC ssht_adjoint.c ssht_core.c ssht_dl.c ssht_sampling.c)
target_link_libraries(ssht PUBLIC ${FFTW3_TARGET} m)
target_include_directories(
ssht
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include>)
set_target_properties(ssht PROPERTIES C_STANDARD 99)
configure_file(ssht_version.in.h ${CMAKE_CURRENT_BINARY_DIR}/ssht_version.h)
set_target_properties(ssht PROPERTIES C_STANDARD 99 ARCHIVE_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/lib)
configure_file(${PROJECT_SOURCE_DIR}/include/ssht/ssht_version.in.h
${PROJECT_BINARY_DIR}/include/ssht/ssht_version.h)

if(fPIC)
set_target_properties(ssht PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
Expand All @@ -19,13 +21,13 @@ if(NOT python)
ARCHIVE DESTINATION lib
PUBLIC_HEADER)
install(
FILES ssht_adjoint.h
ssht_dl.h
ssht_sampling.h
ssht_core.h
ssht_error.h
ssht_types.h
${CMAKE_CURRENT_BINARY_DIR}/ssht_version.h
ssht.h
FILES ${PROJECT_SOURCE_DIR}/include/ssht/ssht_adjoint.h
${PROJECT_SOURCE_DIR}/include/ssht/ssht_dl.h
${PROJECT_SOURCE_DIR}/include/ssht/ssht_sampling.h
${PROJECT_SOURCE_DIR}/include/ssht/ssht_core.h
${PROJECT_SOURCE_DIR}/include/ssht/ssht_error.h
${PROJECT_SOURCE_DIR}/include/ssht/ssht_types.h
${CMAKE_CURRENT_BINARY_DIR}/include/ssht/ssht_version.h
${PROJECT_SOURCE_DIR}/include/ssht/ssht.h
DESTINATION include/ssht)
endif()
2 changes: 1 addition & 1 deletion src/c/ssht_about.c
Expand Up @@ -14,7 +14,7 @@

#include <stdio.h>
#ifdef BUILT_WITH_CMAKE
#include "ssht_version.h"
#include "ssht/ssht_version.h"
#endif

int main(void) {
Expand Down
10 changes: 5 additions & 5 deletions src/c/ssht_adjoint.c
Expand Up @@ -18,11 +18,11 @@
#include <tgmath.h> // Must be before fftw3.h
#include <fftw3.h>

#include "ssht_types.h"
#include "ssht_error.h"
#include "ssht_dl.h"
#include "ssht_sampling.h"
#include "ssht_adjoint.h"
#include "ssht/ssht_types.h"
#include "ssht/ssht_error.h"
#include "ssht/ssht_dl.h"
#include "ssht/ssht_sampling.h"
#include "ssht/ssht_adjoint.h"


//============================================================================
Expand Down
10 changes: 5 additions & 5 deletions src/c/ssht_core.c
Expand Up @@ -18,11 +18,11 @@
#include <tgmath.h>
#include <fftw3.h>

#include "ssht_types.h"
#include "ssht_error.h"
#include "ssht_dl.h"
#include "ssht_sampling.h"
#include "ssht_core.h"
#include "ssht/ssht_types.h"
#include "ssht/ssht_error.h"
#include "ssht/ssht_dl.h"
#include "ssht/ssht_sampling.h"
#include "ssht/ssht_core.h"

#define MAX(a,b) ((a) > (b) ? (a) : (b))

Expand Down
6 changes: 3 additions & 3 deletions src/c/ssht_dl.c
Expand Up @@ -41,9 +41,9 @@

#include <stdlib.h>
#include <math.h>
#include "ssht_types.h"
#include "ssht_error.h"
#include "ssht_dl.h"
#include "ssht/ssht_types.h"
#include "ssht/ssht_error.h"
#include "ssht/ssht_dl.h"

double logfact(int n);

Expand Down
2 changes: 1 addition & 1 deletion src/c/ssht_sampling.c
Expand Up @@ -11,7 +11,7 @@
*/


#include "ssht_types.h"
#include "ssht/ssht_types.h"

#define ABS(x) ((x) >= 0 ? (x) : -(x))

Expand Down
2 changes: 1 addition & 1 deletion src/c/ssht_test.c
Expand Up @@ -19,7 +19,7 @@
#include <stdlib.h>
#include <time.h>

#include "ssht.h"
#include "ssht/ssht.h"

#define NREPEAT 5
#define MAX(a, b) ((a) > (b) ? (a) : (b))
Expand Down
2 changes: 1 addition & 1 deletion tests/interface.c
@@ -1,7 +1,7 @@
#include <string.h>

#include "interface.h"
#include "ssht.h"
#include "ssht/ssht.h"
#include "utilities.h"

void ssht_real_inverse(
Expand Down
4 changes: 2 additions & 2 deletions tests/interface.h
Expand Up @@ -3,8 +3,8 @@

#include <stddef.h>

#include "ssht_dl.h"
#include "ssht_types.h"
#include "ssht/ssht_dl.h"
#include "ssht/ssht_types.h"

/*! Identifies different implementation of the transforms. */
typedef enum {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ssht.c
Expand Up @@ -7,8 +7,8 @@
#include <string.h>

#include "interface.h"
#include "ssht.h"
#include "ssht_error.h"
#include "ssht/ssht.h"
#include "ssht/ssht_error.h"
#include "utilities.h"

#include <cmocka.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/utilities.c
@@ -1,4 +1,4 @@
#include "ssht.h"
#include "ssht/ssht.h"
#include "utilities.h"

#include <complex.h>
Expand Down

0 comments on commit e3e1d5f

Please sign in to comment.