-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
76 lines (69 loc) · 2.12 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# CMake for CFortranTranslator
#
cmake_minimum_required (VERSION 3.10)
project (cppduals CXX)
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_EXTENSIONS OFF)
set (CMAKE_DISABLE_IN_SOURCE_BUILD ON)
if (NOT CMAKE_CONFIGURATION_TYPES AND
NOT CMAKE_NO_BUILD_TYPE AND
NOT CMAKE_BUILD_TYPE AND
CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set (CMAKE_BUILD_TYPE RelWithDebInfo)
set_property (CACHE CMAKE_BUILD_TYPE PROPERTY
STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
include (ExternalProject)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
if (NOT WIN32)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wno-enum-compare")
endif ()
find_package (BISON REQUIRED)
bison_target (for90 src/grammar/for90.y ${CMAKE_CURRENT_BINARY_DIR}/for90.cpp)
include_directories (${CMAKE_SOURCE_DIR}/src/grammar/)
set (CPPS
src/main.cpp
for90std/farray.cpp
for90std/for90std.cpp
for90std/forfilesys.cpp
for90std/forlang.cpp
for90std/forstdio.cpp
src/develop.cpp
src/getopt2.cpp
src/grammar/simple_lexer.cpp
src/parser/attribute.cpp
src/parser/Function.cpp
src/parser/Intent.cpp
src/parser/parser.cpp
src/parser/scanner.cpp
src/parser/tokenizer.cpp
src/parser/Variable.cpp
src/target/gen_common.cpp
src/target/gen_arraybuilder.cpp
src/target/gen_attr_describer.cpp
src/target/gen_callable.cpp
src/target/gen_config.cpp
src/target/gen_dimenslice.cpp
src/target/gen_do.cpp
src/target/gen_doc.cpp
src/target/gen_exp.cpp
src/target/gen_feature.cpp
src/target/gen_function.cpp
src/target/gen_if.cpp
src/target/gen_io.cpp
src/target/gen_label.cpp
src/target/gen_paramtable.cpp
src/target/gen_program.cpp
src/target/gen_select.cpp
src/target/gen_stmt.cpp
src/target/gen_suite.cpp
src/target/gen_type.cpp
src/target/gen_vardef.cpp
src/target/gen_variable.cpp
src/target/lazygen.cpp
${BISON_for90_OUTPUTS} #src/grammar/for90.tab.cpp
)
add_executable (CFortranTranslator ${CPPS})