From 1a0c5dc16aed6d1fcf5df665e7a6d744f6ae9221 Mon Sep 17 00:00:00 2001 From: Lucas Z Date: Fri, 19 Aug 2022 19:53:54 +0000 Subject: [PATCH 1/2] fix cmake --- CMakeLists.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b78ce5c..ef03e64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ if(NFL_OPTIMIZED) check_cxx_source_compiles("#include \nint main() { return 0;}" NFLLIB_USE_SSE) if(NFLLIB_USE_AVX) message(STATUS "Using AVX vector engine") - add_definitions(-DNTT_AVX2) + add_definitions(-DNTT_AVX) elseif(NFLLIB_USE_SSE) message(STATUS "Using SSE vector engine") add_definitions(-DNTT_SSE) @@ -30,11 +30,11 @@ endif() include(CMakeCompilers.txt) -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) find_package(GMP REQUIRED) find_package(MPFR REQUIRED) -include_directories(include include/nfl include/nfl/arch include/nfl/opt include/nfl/opt/arch include/nfl/prng) +include_directories(include include/nfl include/nfl/arch include/nfl/prng) file(GLOB NFLLIB_ASMS lib/prng/*.s) @@ -42,8 +42,6 @@ file(GLOB NFLLIB_SRCS lib/prng/*.cpp lib/params/*.cpp) file(GLOB NFLLIB_HDRS_0 include/nfl.hpp) file(GLOB NFLLIB_HDRS_1 include/nfl/*.hpp) file(GLOB NFLLIB_HDRS_2 include/nfl/arch/*.hpp) -file(GLOB NFLLIB_HDRS_3 include/nfl/opt/*.hpp) -file(GLOB NFLLIB_HDRS_4 include/nfl/opt/arch/*.hpp) file(GLOB NFLLIB_PRNG_HDRS include/nfl/prng/*.hpp include/nfl/prng/*.h) # shared library @@ -60,8 +58,6 @@ install(FILES ${NFLLIB_} DESTINATION include) install(FILES ${NFLLIB_HDRS_0} DESTINATION include) install(FILES ${NFLLIB_HDRS_1} DESTINATION include/nfl) install(FILES ${NFLLIB_HDRS_2} DESTINATION include/nfl/arch) -install(FILES ${NFLLIB_HDRS_3} DESTINATION include/nfl/opt) -install(FILES ${NFLLIB_HDRS_4} DESTINATION include/nfl/opt/arch) install(FILES ${NFLLIB_PRNG_HDRS} DESTINATION include/nfl/prng) add_subdirectory(tests) From 60bd2db29d7ff5a9daccb53c82f61160955b551b Mon Sep 17 00:00:00 2001 From: Lucas Z Date: Fri, 19 Aug 2022 19:55:20 +0000 Subject: [PATCH 2/2] before --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef03e64..dacadca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ if(NFL_OPTIMIZED) check_cxx_source_compiles("#include \nint main() { return 0;}" NFLLIB_USE_SSE) if(NFLLIB_USE_AVX) message(STATUS "Using AVX vector engine") - add_definitions(-DNTT_AVX) + add_definitions(-DNTT_AVX2) elseif(NFLLIB_USE_SSE) message(STATUS "Using SSE vector engine") add_definitions(-DNTT_SSE) @@ -34,7 +34,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) find_package(GMP REQUIRED) find_package(MPFR REQUIRED) -include_directories(include include/nfl include/nfl/arch include/nfl/prng) +include_directories(include include/nfl include/nfl/arch include/nfl/opt include/nfl/opt/arch include/nfl/prng) file(GLOB NFLLIB_ASMS lib/prng/*.s) @@ -42,6 +42,8 @@ file(GLOB NFLLIB_SRCS lib/prng/*.cpp lib/params/*.cpp) file(GLOB NFLLIB_HDRS_0 include/nfl.hpp) file(GLOB NFLLIB_HDRS_1 include/nfl/*.hpp) file(GLOB NFLLIB_HDRS_2 include/nfl/arch/*.hpp) +file(GLOB NFLLIB_HDRS_3 include/nfl/opt/*.hpp) +file(GLOB NFLLIB_HDRS_4 include/nfl/opt/arch/*.hpp) file(GLOB NFLLIB_PRNG_HDRS include/nfl/prng/*.hpp include/nfl/prng/*.h) # shared library @@ -58,6 +60,8 @@ install(FILES ${NFLLIB_} DESTINATION include) install(FILES ${NFLLIB_HDRS_0} DESTINATION include) install(FILES ${NFLLIB_HDRS_1} DESTINATION include/nfl) install(FILES ${NFLLIB_HDRS_2} DESTINATION include/nfl/arch) +install(FILES ${NFLLIB_HDRS_3} DESTINATION include/nfl/opt) +install(FILES ${NFLLIB_HDRS_4} DESTINATION include/nfl/opt/arch) install(FILES ${NFLLIB_PRNG_HDRS} DESTINATION include/nfl/prng) add_subdirectory(tests)