blob: 4f29504b3f70121e2378cca38122702615b96572 (
plain)
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
|
cmake_minimum_required(VERSION 3.0)
project(wolff)
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set (CMAKE_CXX_STANDARD 17)
include_directories(lib ~/.local/include)
link_directories(~/.local/lib)
file(GLOB CSOURCES lib/*.c)
file(GLOB CPPSOURCES lib/*.cpp)
add_executable(wolff_finite src/wolff_finite.c ${CSOURCES})
add_executable(wolff_heisenberg src/wolff_heisenberg.cpp ${CPPSOURCES} ${CSOURCES})
add_executable(wolff_planar src/wolff_planar.cpp ${CPPSOURCES} ${CSOURCES})
add_executable(analyze_correlations src/analyze_correlations.cpp ${CPPSOURCES} ${CSOURCES})
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
target_link_libraries(wolff_finite gsl cblas fftw3 m)
target_link_libraries(wolff_heisenberg gsl cblas fftw3 m)
target_link_libraries(wolff_planar gsl cblas fftw3 m)
target_link_libraries(analyze_correlations gsl cblas fftw3 m)
install(TARGETS wolff_finite wolff_heisenberg wolff_planar analyze_correlations DESTINATION bin)
|