forked from joeydumont/wignerSymbols
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (38 loc) · 1.27 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
# Name of project
project(wignerSymbols)
set (wignerSymbols_VERSION_MAJOR 0)
set (wignerSymbols_VERSION_MINOR 2)
set (wignerSymbols_VERSION_RELEASE 0)
# CMake config
cmake_minimum_required(VERSION 2.8)
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set (CMAKE_INSTALL_PREFIX /usr)
endif()
# Compiler config
enable_language (Fortran)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -march=native")
# Included files
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include INC_LIST)
# Source files
aux_source_directory(./src SRC_LIST)
# Build a shared library
add_library(${PROJECT_NAME} SHARED
${SRC_LIST}
"./src/wignerSymbols-fortran.f"
"./src/machine.for"
"./src/fdump.f"
"./src/j4save.f"
"./src/xercnt.f"
"./src/xerhlt.f"
"./src/xermsg.f"
"./src/xerprn.f"
"./src/xersve.f"
"./src/xgetua.f"
"./src/wignerSymbols-fortran-c-binding.f90" )
SET_TARGET_PROPERTIES(${PROJECT_NAME}
PROPERTIES
VERSION ${wignerSymbols_VERSION_MAJOR}.${wignerSymbols_VERSION_MINOR}.${wignerSymbols_VERSION_RELEASE}
SOVERSION ${wignerSymbols_VERSION_MAJOR}.${wignerSymbols_VERSION_MINOR}.${wignerSymbols_VERSION_RELEASE})
# Install directories
install(TARGETS ${PROJECT_NAME} DESTINATION lib)
install(DIRECTORY include/ DESTINATION include)