aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-02-11 18:15:32 +0100
committerThomas White <taw@physics.org>2019-03-11 16:49:36 +0100
commit24ce9e4ac098d7744fb23f535eb97f3375425fd8 (patch)
tree5f8d9a85dd1761e51e0905cbaea0e20a5e299d43 /libcrystfel/CMakeLists.txt
parent9a3ef1de0b661085a26d9be60bcff9e261783acd (diff)
Symmetry operation parser using Flex/Bison
Diffstat (limited to 'libcrystfel/CMakeLists.txt')
-rw-r--r--libcrystfel/CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
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)