forked from liangdong158/fpotencia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
51 lines (34 loc) · 1.01 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
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(fPotencia VERSION 0.8 LANGUAGES CXX)
include(FindDoxygen)
include(FindPkgConfig)
include(GNUInstallDirs)
find_package(GTest)
find_package(Boost REQUIRED COMPONENTS graph)
pkg_check_modules(eigen3 REQUIRED eigen3>=3.2.8)
option(BUILD_UNSUPPORTED_SOLVERS
"Build currently unsupported (i.e., test-failing) Load Flow solvers"
OFF)
option(WITH_OPENMP
"Include support for parallelization through OpenMP"
OFF)
if(WITH_OPENMP)
include(FindOpenMP)
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
endif()
configure_file("config.h.in" "config.h")
configure_file("Doxyfile.in" "Doxyfile")
add_subdirectory(src)
if(GTEST_FOUND)
enable_testing()
add_subdirectory(test)
endif()
if(DOXYGEN_FOUND)
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE}
DEPENDS Doxyfile.in)
endif()