This repository has been archived by the owner on Jun 25, 2022. It is now read-only.
forked from 48ca/wave-function-evolution
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (41 loc) · 1.52 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required(VERSION 3.1.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Ofast")
set(NO_QUADMATH FALSE CACHE BOOL "Prevent usage of libquadmath")
include(CheckIncludeFiles)
########### FFTW
# - Find FFTW
# Find the native FFTW includes and library
#
# FFTW_INCLUDES - where to find fftw3.h
# FFTW_LIBRARIES - List of libraries when using FFTW.
# FFTW_FOUND - True if FFTW found.
if (FFTW_INCLUDES)
# Already in cache, be silent
set (FFTW_FIND_QUIETLY TRUE)
endif (FFTW_INCLUDES)
find_path (FFTW_INCLUDES fftw3.h)
find_library (FFTW_LIBRARIES NAMES fftw3)
# handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
# all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (FFTW DEFAULT_MSG FFTW_LIBRARIES FFTW_INCLUDES)
mark_as_advanced (FFTW_LIBRARIES FFTW_INCLUDES)
########### End FFTW
########### libquadmath
if(NOT NO_QUADMATH)
check_include_files(quadmath.h HAS_QUADMATH_H)
if (HAS_QUADMATH_H)
add_definitions(-DUSING_QUADMATH)
endif (HAS_QUADMATH_H)
endif(NOT NO_QUADMATH)
########## End libquadmath
add_library(complex STATIC complex.cpp)
if(HAS_QUADMATH_H)
target_link_libraries(complex quadmath)
endif(HAS_QUADMATH_H)
add_executable(test-complex test-complex.cpp)
target_link_libraries(test-complex -lm complex)
add_executable(evolve evolve.cpp)
target_link_libraries(evolve -lm complex)
#TODO add back ${FFTW_LIBRARIES} to linked libraries in evolve b/c it was not found over ssh
#install(TARGETS evolve DESTINATION bin)