-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
50 lines (37 loc) · 1.33 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_minimum_required (VERSION 2.8)
project(networkVMC CXX)
# set the default build type (RELEASE) if none is specified
set(default_build_type "RELEASE")
# check if the build type is empty, if yes, set it to release
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type specified, defaulting to RELEASE")
set(CMAKE_BUILD_TYPE "${default_build_type}")
endif()
# which compiler?
message(STATUS "Using ${CMAKE_CXX_COMPILER_ID} compiler")
# define the flags for release/debug/default
include(cmake/${CMAKE_CXX_COMPILER_ID}_flags.cmake)
#enable openmp
#find_package(OpenMP)
include(FindOpenMP)
if(OPENMP_FOUND)
message(STATUS "Using OpenMP ${OpenMP_VERSION}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else()
message(STATUS "WARNING: Did not find OpenMP, disabled shared memory paralleization")
endif()
add_subdirectory(src)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
#include eigen
include_directories("${PROJECT_SOURCE_DIR}/lib/eigen")
# get the boost installation
find_package(Boost 1.40 COMPONENTS regex REQUIRED)
#include boost
include_directories(${Boost_INCLUDE_DIR})
# define the library
add_library(networkVMC SHARED ${SOURCES})
# link with boost
target_link_libraries(networkVMC LINK_PUBLIC ${Boost_LIBRARIES})
# specify that we always link to networkVMC
#link_libraries(networkVMC)
add_subdirectory(test)