Skip to content

Commit

Permalink
Merge pull request #163 from weijiekoh/main
Browse files Browse the repository at this point in the history
Support cmake versions below 3.24.0
  • Loading branch information
jeremyfelder committed Aug 27, 2023
2 parents 8c7b2bb + 6dd7722 commit b216287
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ ICICLE is a CUDA implementation of general functions widely used in ZKP. ICICLE

## Build and usage

> NOTE: [NVCC] is a prerequisite for building.

### Prerequisites

- [NVCC]
- cmake 3.18 and above

### Steps

1. Define or select a curve for your application; we've provided a [template][CRV_TEMPLATE] for defining a curve
2. Include the curve in [`curve_config.cuh`][CRV_CONFIG]
Expand Down
4 changes: 3 additions & 1 deletion icicle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ set(CMAKE_CUDA_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
# add the target cuda architectures
# each additional architecture increases the compilation time and output file size
if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
if (${CMAKE_VERSION} VERSION_LESS "3.24.0")
set(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCH})
else()
set(CMAKE_CUDA_ARCHITECTURES native) # on 3.24+, on earlier it is ignored, and the target is not passed
endif ()
project(icicle LANGUAGES CUDA CXX)
Expand Down

0 comments on commit b216287

Please sign in to comment.