Skip to content

Commit

Permalink
Update CMakeLists.txt (#280)
Browse files Browse the repository at this point in the history
* Update CMakeLists.txt

FreeBSD has a port for pybind11, so use it when on FreeBSD instead of downloading a new copy.

* Update setup.py

Typo in url="", fixed.

* Create Makefile
  • Loading branch information
risner authored Jul 21, 2021
1 parent 640713a commit 32c7afa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ project(chiapos C CXX ASM)
# CMake 3.14+
include(FetchContent)

if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake)
else()
FetchContent_Declare(
pybind11-src
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG v2.6.2
)
FetchContent_MakeAvailable(pybind11-src)
endif()

FetchContent_Declare(
cxxopts
Expand Down
14 changes: 14 additions & 0 deletions hellman_example/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
all: HellmanAttacks

OBJ = aes.o bits.o calculate_bucket.o cxxopts.o encoding.o hellman.o picosha2.o plotter_disk.o pos_constants.o prover_disk.o sort_on_disk.o util.o verifier.o

.SUFFIXES:.hpp .o

.hpp.o:
$(CC) -c $(CXXFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@

HellmanAttacks: ${OBJ}
${CC} -o HellmanAttacks ${OBJ}

clean:
rm -f HellmanAttacks ${OBJ}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def build_extensions(self):
python_requires=">=3.7",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/Chia-Network/chiavdf",
url="https://github.com/Chia-Network/chiapos",
ext_modules=[CMakeExtension("chiapos", ".")],
cmdclass=dict(build_ext=CMakeBuild),
zip_safe=False,
Expand Down

0 comments on commit 32c7afa

Please sign in to comment.