From aabfa542ce2721540d40bf9d53f207ec149ee6ef Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 30 Jan 2020 19:02:09 +0100 Subject: [PATCH] cmake: fix csl generation --- libmemcached/CMakeLists.txt | 15 +++++++++++++-- libmemcached/csl/CMakeLists.txt | 17 ----------------- 2 files changed, 13 insertions(+), 19 deletions(-) delete mode 100644 libmemcached/csl/CMakeLists.txt diff --git a/libmemcached/CMakeLists.txt b/libmemcached/CMakeLists.txt index 04b45cf5..eca34f5d 100644 --- a/libmemcached/CMakeLists.txt +++ b/libmemcached/CMakeLists.txt @@ -1,8 +1,19 @@ -add_subdirectory(csl) +find_package(FLEX) +find_package(BISON) + +bison_target(CSL_PARSER csl/parser.yy ${CMAKE_CURRENT_BINARY_DIR}/csl/parser.cc + DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/csl/parser.h + ) +flex_target(CSL_SCANNER csl/scanner.l ${CMAKE_CURRENT_BINARY_DIR}/csl/scanner.cc + DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/csl/scanner.h + ) +add_flex_bison_dependency(CSL_SCANNER CSL_PARSER) set(LIBMEMCACHED_SOURCES - ${CSL_SOURCES} + csl/context.cc + ${BISON_CSL_PARSER_OUTPUTS} + ${FLEX_CSL_SCANNER_OUTPUTS} allocators.cc analyze.cc array.c diff --git a/libmemcached/csl/CMakeLists.txt b/libmemcached/csl/CMakeLists.txt deleted file mode 100644 index 7b337edb..00000000 --- a/libmemcached/csl/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ - -find_package(FLEX) -find_package(BISON) - -flex_target(CSL_SCANNER scanner.l ${CMAKE_CURRENT_SOURCE_DIR}/scanner.cc - DEFINES_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scanner.h - ) -bison_target(CSL_PARSER parser.yy ${CMAKE_CURRENT_SOURCE_DIR}/parser.cc - DEFINES_FILE ${CMAKE_CURRENT_SOURCE_DIR}/parser.h - ) -add_flex_bison_dependency(CSL_SCANNER CSL_PARSER) - -set(CSL_SOURCES - csl/context.cc - ${BISON_CSL_PARSER_OUTPUTS} - ${FLEX_CSL_SCANNER_OUTPUTS} - PARENT_SCOPE) -- 2.30.2