<commit_before># Copyright 2006-2008 The FLWOR Foundation.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

INCLUDE(${CMAKE_MODULE_PATH}/AddSrcSubfolder.cmake)

INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/external) 

#
# only platform headers and configuration stuff is in there
#
# Commented these as out, as there are no CMakeLists.txt files in those
# folders and Zorba does not build on Windows because of that.
#ADD_SUBDIRECTORY(common)
#ADD_SUBDIRECTORY(zorbamisc)



################################################################################
#                                                                              #
# Build the common libraries, i.e., the ones required by both the query        #
# processor and the store: zorbatypes, zorbaerrors, and zorbautils.            #
#                                                                              #
################################################################################

ADD_SUBDIRECTORY(zorbautils)

ADD_SUBDIRECTORY(zorbatypes)

ADD_SUBDIRECTORY(zorbaerrors)


################################################################################
#                                                                              #
# Build the store library (or libraries)                                       #
#                                                                              #
################################################################################

ADD_SUBDIRECTORY(store)


################################################################################
#                                                                              #
# Build the zorba library                                                      #
#                                                                              #
################################################################################

#
# Get all libraries that libzorba depends on
#
SET(requiredlibs-zorba ${requiredlibs-zorba} zorbautils)
SET(requiredlibs-zorba ${requiredlibs-zorba} zorbatypes)
SET(requiredlibs-zorba ${requiredlibs-zorba} zorbaerrors)


#
# Next, add the files to be compiled into the library
#
SET(ZORBA_SRCS)

ADD_SRC_SUBFOLDER(ZORBA_SRCS api API_SRCS )

FOREACH (SRCS ${API_BUILD_SRCS})
  LIST(APPEND ZORBA_SRCS ${SRCS})
ENDFOREACH (SRCS)

ADD_SRC_SUBFOLDER(ZORBA_SRCS capi CAPI_SRCS )
ADD_SRC_SUBFOLDER(ZORBA_SRCS compiler COMPILER_SRCS)

FOREACH (SRCS ${COMPILER_BUILD_SRCS})
  LIST(APPEND ZORBA_SRCS ${SRCS})
ENDFOREACH (SRCS)

ADD_SRC_SUBFOLDER(ZORBA_SRCS system SYSTEM_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS context CONTEXT_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS errors	ERRORS_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS functions FUNCTIONS_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS runtime RUNTIME_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS types TYPES_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS util UTIL_SRCS)

IF (ZORBA_DEBUGGER)
  ADD_SRC_SUBFOLDER(ZORBA_SRCS debugger DEBUGGER_SRCS)
ENDIF (ZORBA_DEBUGGER)


SET(ZORBA_LIBRARY_INSTALL_LIST)

#
# Build the Zorba SHARED library
#
ADD_LIBRARY(zorba SHARED ${ZORBA_SRCS})
<commit_msg>Modified the build scripts to create the zorba.lib file on Windows, needed to fix the build.<commit_after># Copyright 2006-2008 The FLWOR Foundation.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
# http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

INCLUDE(${CMAKE_MODULE_PATH}/AddSrcSubfolder.cmake)

INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
INCLUDE_DIRECTORIES(BEFORE ${CMAKE_SOURCE_DIR}/external) 

#
# only platform headers and configuration stuff is in there
#
# Commented these as out, as there are no CMakeLists.txt files in those
# folders and Zorba does not build on Windows because of that.
#ADD_SUBDIRECTORY(common)
#ADD_SUBDIRECTORY(zorbamisc)



################################################################################
#                                                                              #
# Build the common libraries, i.e., the ones required by both the query        #
# processor and the store: zorbatypes, zorbaerrors, and zorbautils.            #
#                                                                              #
################################################################################

ADD_SUBDIRECTORY(zorbautils)

ADD_SUBDIRECTORY(zorbatypes)

ADD_SUBDIRECTORY(zorbaerrors)


################################################################################
#                                                                              #
# Build the store library (or libraries)                                       #
#                                                                              #
################################################################################

ADD_SUBDIRECTORY(store)


################################################################################
#                                                                              #
# Build the zorba library                                                      #
#                                                                              #
################################################################################

#
# Get all libraries that libzorba depends on
#
SET(requiredlibs-zorba ${requiredlibs-zorba} zorbautils)
SET(requiredlibs-zorba ${requiredlibs-zorba} zorbatypes)
SET(requiredlibs-zorba ${requiredlibs-zorba} zorbaerrors)


#
# Next, add the files to be compiled into the library
#
SET(ZORBA_SRCS)

ADD_SRC_SUBFOLDER(ZORBA_SRCS api API_SRCS )

FOREACH (SRCS ${API_BUILD_SRCS})
  LIST(APPEND ZORBA_SRCS ${SRCS})
ENDFOREACH (SRCS)

ADD_SRC_SUBFOLDER(ZORBA_SRCS capi CAPI_SRCS )
ADD_SRC_SUBFOLDER(ZORBA_SRCS compiler COMPILER_SRCS)

FOREACH (SRCS ${COMPILER_BUILD_SRCS})
  LIST(APPEND ZORBA_SRCS ${SRCS})
ENDFOREACH (SRCS)

ADD_SRC_SUBFOLDER(ZORBA_SRCS system SYSTEM_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS context CONTEXT_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS errors	ERRORS_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS functions FUNCTIONS_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS runtime RUNTIME_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS types TYPES_SRCS)
ADD_SRC_SUBFOLDER(ZORBA_SRCS util UTIL_SRCS)

IF (ZORBA_DEBUGGER)
  ADD_SRC_SUBFOLDER(ZORBA_SRCS debugger DEBUGGER_SRCS)
ENDIF (ZORBA_DEBUGGER)


SET(ZORBA_LIBRARY_INSTALL_LIST)

#
# Build the Zorba SHARED library
#
ADD_LIBRARY(zorba SHARED ${ZORBA_SRCS})

# The next if() builds the .lib file on Windows, which is needed
IF (MSVC)
  ADD_LIBRARY(zorba ${ZORBA_SRCS})
ENDIF (MSVC)

{'fraction_non_alphanumeric': 0.18329160627223612, 'fraction_numerical': 0.0031624719989458427, 'mean_word_length': 2.9634464751958225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 42, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4509518', 'n_tokens_mistral': 2170, 'n_tokens_neox': 2093, 'n_words': 529}