-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
51 lines (36 loc) · 1.55 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
# CMake makefile for the minichem program
# 2018 A. Oleynichenko
cmake_minimum_required(VERSION 3.1)
project(minichem)
set(C_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE Debug)
############################## OpenMP ##################################
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}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
################################ MPI ###################################
find_package(MPI REQUIRED)
include_directories(SYSTEM ${MPI_INCLUDE_PATH}) # MPI header files
########################### Standard = C99 #############################
#if(CMAKE_COMPILER_IS_GNUCC)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic")
#endif()
############################# Compile it ! #############################
include_directories(include)
include_directories(/usr/local/opt/openblas/include)
include_directories(/usr/local/opt/libomp/include)
add_subdirectory(src/input)
add_subdirectory(src/sys)
add_subdirectory(src/linalg)
add_subdirectory(src/util)
add_subdirectory(src/scf)
add_subdirectory(src/visual)
add_subdirectory(src/aoints)
add_executable(minichem.x src/main.c)
target_link_libraries(minichem.x scf aoints input util visual)
target_link_libraries(minichem.x m ${MPI_C_LIBRARIES})
target_link_libraries(minichem.x m lapack cblas gomp -L/usr/local/Cellar/lapack/3.8.0_1/lib lapacke)
set_property(TARGET minichem.x PROPERTY C_STANDARD 99)