Skip to content

Commit

Permalink
fix cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
lu1and10 committed Jul 11, 2024
1 parent 70ce2f9 commit 25096f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ if (CMAKE_CXX_COMPILER_ID IN_LIST GNU_LIKE_FRONTENDS)
endif ()

include(CTest)
# Set default build type to Release
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Set the default build type to Release" FORCE)
endif()

if (CMAKE_CXX_COMPILER_ID IN_LIST GNU_LIKE_FRONTENDS)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "ppc|ppc64|powerpc|powerpc64" OR (APPLE AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc|ppc64"))
Expand Down Expand Up @@ -228,11 +232,13 @@ if (FINUFFT_USE_CPU)
target_compile_definitions(finufft_f32_dll PRIVATE SINGLE dll_EXPORTS FINUFFT_DLL)
set_finufft_options(finufft_f32_dll)
target_link_libraries(finufft_f32_dll PUBLIC ${FINUFFT_FFTLIBS})
target_link_libraries(finufft_f32_dll PRIVATE xsimd)

add_library(finufft_f64_dll OBJECT ${FINUFFT_PRECISION_DEPENDENT_SOURCES})
target_compile_definitions(finufft_f64_dll PRIVATE dll_EXPORTS FINUFFT_DLL)
set_finufft_options(finufft_f64_dll)
target_link_libraries(finufft_f64_dll PUBLIC ${FINUFFT_FFTLIBS})
target_link_libraries(finufft_f64_dll PRIVATE xsimd)
endif ()

add_library(finufft SHARED src/utils_precindep.cpp contrib/legendre_rule_fast.cpp)
Expand Down
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ set(TESTS basicpassfail dumbinputs finufft1d_test finufft1dmany_test finufft2d_t

foreach(TEST ${TESTS})
add_executable(${TEST} ${TEST}.cpp)
target_compile_features(${TEST} PRIVATE cxx_std_17)
finufft_link_test(${TEST})

add_executable(${TEST}f ${TEST}.cpp)
target_compile_definitions(${TEST}f PRIVATE -DSINGLE)
target_compile_features(${TEST}f PRIVATE cxx_std_17)
finufft_link_test(${TEST}f)
endforeach()

Expand Down

0 comments on commit 25096f8

Please sign in to comment.