Skip to content

Commit

Permalink
🩹 fine tune FindFLINT.cmake
Browse files Browse the repository at this point in the history
Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Jul 3, 2024
1 parent c615b13 commit 2e920a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cmake/FindFLINT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ find_package_handle_standard_args(FLINT DEFAULT_MSG FLINT_LIBRARY FLINT_INCLUDE_
if(FLINT_FOUND)
add_library(flint UNKNOWN IMPORTED)
set_target_properties(flint PROPERTIES IMPORTED_LOCATION ${FLINT_LIBRARY})

# Strip the trailing "flint" from the include directory
if("${FLINT_INCLUDE_DIR}" MATCHES "flint$")
get_filename_component(FLINT_INCLUDE_DIR ${FLINT_INCLUDE_DIR} DIRECTORY)
endif()

target_include_directories(flint INTERFACE ${FLINT_INCLUDE_DIR})
target_link_libraries(flint INTERFACE GMP::gmp GMP::gmpxx MPFR::mpfr)
endif()
2 changes: 1 addition & 1 deletion include/Utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <algorithm>
#include <cassert>
#include <filesystem>
#include <flint/nmod_matxx.h>
#include <fstream>
#include <iostream>
#include <nmod_matxx.h>
#include <ostream>
#include <random>
#include <set>
Expand Down

0 comments on commit 2e920a5

Please sign in to comment.