CMakeLists.txt 1.78 KB
Newer Older
Pierre Aubert's avatar
Pierre Aubert committed
1 2 3 4 5
project(Phoenix)
cmake_minimum_required(VERSION 3.0)

add_subdirectory(cmake)

Pierre Aubert's avatar
Pierre Aubert committed
6
phoenix_base_project("ParserGenerator" "1.6.1"
Pierre Aubert's avatar
Pierre Aubert committed
7 8 9
		"Tool to generate file parser for programming languages"
		"https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/ParserGenerator")

10

Pierre Aubert's avatar
Pierre Aubert committed
11
pull_extra_module("OptionParser" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/OptionParser.git")
Pierre Aubert's avatar
Pierre Aubert committed
12
pull_extra_module("FileParser" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/FileParser.git")
Pierre Aubert's avatar
Pierre Aubert committed
13 14 15 16 17 18
pull_extra_module("PhoenixGenerator" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/PhoenixGenerator.git")
pull_extra_module("PhoenixCompareFile" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/PhoenixCompareFile.git")

include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src/Stmt)

19 20
phoenix_create_find(ParserGenerator phoenix_parser_stmt Stmt/PStmt.h parser_generator_extra.cmake "OptionParser" "FileParser" "StringUtils")
install(FILES parser_generator_extra.cmake DESTINATION share/cmake)
Pierre Aubert's avatar
Pierre Aubert committed
21 22 23 24 25 26

add_definitions(-DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")

add_subdirectory(src)
add_subdirectory(share)

Pierre Aubert's avatar
Pierre Aubert committed
27 28 29
set(SCRIPT_LAUNCH_TARGET ${CMAKE_CURRENT_SOURCE_DIR}/TESTS/scriptLauchTarget.sh.cmake)
set(PHOENIX_PARSER_GENERATOR_DIR ${CMAKE_CURRENT_BINARY_DIR}/src)
set(PHOENIX_PARSER_GENERATOR_EXECUTABLE ${PHOENIX_PARSER_GENERATOR_DIR}/phoenix_parser_generator)
Pierre Aubert's avatar
Pierre Aubert committed
30

Pierre Aubert's avatar
Pierre Aubert committed
31 32 33 34 35 36 37 38 39 40
if(SELF_TESTS_MODE)
	include(CTest)
	add_subdirectory(TESTS)
endif(SELF_TESTS_MODE)

if(DOC_MODE)
	pull_extra_module("PhoenixTex2Html" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS/PhoenixTex2Html.git")
	add_subdirectory(doc)
endif(DOC_MODE)

Pierre Aubert's avatar
Pierre Aubert committed
41
set(PHOENIX_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src;${CMAKE_CURRENT_SOURCE_DIR}/src/Stmt;${PHOENIX_INCLUDE_DIRS}" CACHE INTERNAL "list of Phoenix include dirs")
Pierre Aubert's avatar
Pierre Aubert committed
42 43