cmake: fix csl generation
authorMichael Wallner <mike@php.net>
Thu, 30 Jan 2020 18:02:09 +0000 (19:02 +0100)
committerMichael Wallner <mike@php.net>
Thu, 30 Jan 2020 18:02:09 +0000 (19:02 +0100)
libmemcached/CMakeLists.txt
libmemcached/csl/CMakeLists.txt [deleted file]

index 04b45cf51dc856959ec08a14715aa23657eeb276..eca34f5d9fb666d6583e5db09a4257287445b9da 100644 (file)
@@ -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 (file)
index 7b337ed..0000000
+++ /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)