forked from llvm-fortran/libfortrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (48 loc) · 1.18 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
52
53
54
55
56
57
58
59
60
61
project(Libfort)
cmake_minimum_required(VERSION 2.8)
# Enable C++ 11
if(NOT MSVC)
add_definitions(-std=c++11 -fno-exceptions)
endif()
set(libfort_sources)
macro(add_libfort_library name)
set(srcs ${ARGN})
if (MODULE)
set(libkind MODULE)
elseif (SHARED_LIBRARY)
set(libkind SHARED)
else()
set(libkind)
endif()
add_library( ${name} ${libkind} ${srcs} )
endmacro(add_libfort_library)
include_directories(include)
add_subdirectory(include)
add_subdirectory(lib)
if (MODULE)
set(libkind MODULE)
elseif (SHARED_LIBRARY)
set(libkind SHARED)
else()
set(libkind)
endif()
add_library(libfort ${libkind} lib/Libfort.cpp
lib/Core/Core.cpp
lib/Numerical/Complex.cpp
lib/Numerical/Integer.cpp
lib/Strings/Character.cpp
lib/IO/Write.cpp
lib/System/System.cpp
)
install(TARGETS libfort
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
# Tests
macro(add_libfort_test name)
add_executable( ${name} ${ARGN} )
target_link_libraries( ${name} libfort )
endmacro(add_libfort_test)
add_subdirectory(test)
set(BUG_REPORT_URL "http://llvm.org/bugs/" CACHE STRING
"Default URL where bug reports are to be submitted.")