From 24ce9e4ac098d7744fb23f535eb97f3375425fd8 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 11 Feb 2019 18:15:32 +0100 Subject: Symmetry operation parser using Flex/Bison --- libcrystfel/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libcrystfel/CMakeLists.txt') diff --git a/libcrystfel/CMakeLists.txt b/libcrystfel/CMakeLists.txt index bd4f44ca..014d2a5a 100644 --- a/libcrystfel/CMakeLists.txt +++ b/libcrystfel/CMakeLists.txt @@ -7,6 +7,8 @@ find_package(PINKINDEXER) find_package(NBP) find_package(FDIP) find_package(ZLIB REQUIRED) +find_package(FLEX REQUIRED) +find_package(BISON REQUIRED) pkg_search_module(FFTW fftw3) set(HAVE_CURSES ${CURSES_FOUND}) @@ -30,6 +32,12 @@ endif() configure_file(config.h.cmake.in config.h) +bison_target(symopp src/symop.y ${CMAKE_CURRENT_BINARY_DIR}/symop-parse.c COMPILE_FLAGS --report=all) +flex_target(symopl src/symop.l ${CMAKE_CURRENT_BINARY_DIR}/symop-lex.c + DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/symop-lex.h) +add_flex_bison_dependency(symopl symopp) +include_directories(${PROJECT_SOURCE_DIR}/src) + set(LIBCRYSTFEL_SOURCES src/reflist.c src/utils.c @@ -63,6 +71,8 @@ set(LIBCRYSTFEL_SOURCES src/taketwo.c src/xgandalf.c src/rational.c + ${BISON_symopp_OUTPUTS} + ${FLEX_symopl_OUTPUTS} ) if (HAVE_FFTW) -- cgit v1.2.3