2018-02-15 01:06:47 +08:00
|
|
|
cmake_minimum_required(VERSION 3.9.0)
|
|
|
|
|
|
|
|
set(GCC /home/sw/thirdparty/gcc/gcc-7.3.0/linux86-64/redhat)
|
|
|
|
set(CMAKE_CXX_COMPILER "${GCC}/bin/g++")
|
|
|
|
set(CMAKE_INSTALL_RPATH "${GCC}/lib64")
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH true)
|
|
|
|
|
2018-02-16 07:26:10 +08:00
|
|
|
# project(f18)
|
2018-02-10 06:04:11 +08:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -std=c++17")
|
2018-02-16 02:42:36 +08:00
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DDEBUG")
|
|
|
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "-O2 '-DCHECK=(void)'")
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG")
|
2018-02-15 01:06:47 +08:00
|
|
|
|
2018-02-15 07:29:18 +08:00
|
|
|
set(SOURCES_F18
|
2018-02-15 01:06:47 +08:00
|
|
|
tools/f18/f18.cc
|
|
|
|
lib/parser/char-buffer.cc
|
|
|
|
lib/parser/idioms.cc
|
|
|
|
lib/parser/message.cc
|
|
|
|
lib/parser/parse-tree.cc
|
|
|
|
lib/parser/preprocessor.cc
|
|
|
|
lib/parser/prescan.cc
|
2018-02-08 08:24:02 +08:00
|
|
|
lib/parser/provenance.cc
|
2018-02-15 01:06:47 +08:00
|
|
|
lib/parser/source.cc
|
2018-02-14 04:50:47 +08:00
|
|
|
lib/parser/token-sequence.cc
|
2018-02-15 01:06:47 +08:00
|
|
|
)
|
2018-02-15 07:29:18 +08:00
|
|
|
add_executable(f18 ${SOURCES_F18})
|
|
|
|
|
|
|
|
set(SOURCES_TEST_TYPE
|
|
|
|
tools/f18/test-type.cc
|
|
|
|
lib/semantics/type.cc
|
|
|
|
lib/semantics/attr.cc
|
|
|
|
lib/parser/char-buffer.cc
|
|
|
|
lib/parser/idioms.cc
|
|
|
|
lib/parser/message.cc
|
|
|
|
lib/parser/parse-tree.cc
|
|
|
|
lib/parser/preprocessor.cc
|
|
|
|
lib/parser/prescan.cc
|
2018-02-16 07:26:10 +08:00
|
|
|
lib/parser/provenance.cc
|
2018-02-15 07:29:18 +08:00
|
|
|
lib/parser/source.cc
|
2018-02-16 07:26:10 +08:00
|
|
|
lib/parser/token-sequence.cc
|
2018-02-15 07:29:18 +08:00
|
|
|
)
|
|
|
|
add_executable(test-type ${SOURCES_TEST_TYPE})
|