Skip to content

Commit fb05f21

Browse files
committed
add -fPIC for .c files, rename python/main.cpp -> module.cpp
1 parent 9b30414 commit fb05f21

File tree

5 files changed

+9
-75
lines changed

5 files changed

+9
-75
lines changed

CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
5252
set(CMAKE_CXX_STANDARD 17)
5353

5454
# enable warnings
55+
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -march=native -fPIC")
56+
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g")
57+
5558
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -march=native -fPIC")
5659
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g")
5760

python/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
################################################################################
88

99
add_subdirectory(pybind11)
10-
pybind11_add_module(cobs_python main.cpp)
10+
pybind11_add_module(cobs_python module.cpp)
1111

12-
# rename cobs_python target output to cobs-index
12+
# rename cobs_python target output to cobs_index
1313
set_target_properties(cobs_python PROPERTIES OUTPUT_NAME cobs_index)
1414
target_link_libraries(cobs_python PRIVATE cobs_static)
1515

File renamed without changes.

python/setup.py

-70
This file was deleted.

setup.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ def build_extension(self, ext):
5757
subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
5858

5959
setup(
60-
name='cobs-index',
61-
version='0.0.1',
60+
name='cobs_index',
61+
version='0.1',
6262
author='Timo Bingmann',
6363
author_email='tbdev@panthema.net',
6464
description='Compact Bit-Sliced Signature Index (COBS)',
6565
long_description='',
66-
ext_modules=[CMakeExtension('cobs-index')],
66+
url="https://github.com/bingmann/cobs",
67+
ext_modules=[CMakeExtension('cobs_index')],
6768
cmdclass=dict(build_ext=CMakeBuild),
6869
zip_safe=False,
6970
)

0 commit comments

Comments
 (0)