Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support support for ngram indexer #197

Open
wants to merge 235 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
235 commits
Select commit Hold shift + click to select a range
f77dcb7
Fix compile errors on Mac
Jul 27, 2011
c6ecc25
Disable clang build
Aug 10, 2011
e28b15b
Fix exporting CharFolder and Lucene shared_ptr factory
Aug 21, 2011
2ad20d1
Clarified dual-licensing text.
May 5, 2012
6953f6e
Fix visibility of Lucene++ classes
hasselmm May 4, 2012
783f963
Really hide C symbols of static utility library
hasselmm May 4, 2012
18409f2
Path testdir path to lucene++-tester
hasselmm May 7, 2012
f9fde5c
Also install the contributions library.
hasselmm May 7, 2012
63f1f7f
Install the built HTML documentation.
hasselmm May 7, 2012
f666cb3
Properly link liblucene++-contrib with liblucene++
hasselmm May 7, 2012
c6e5192
Merge pull request #26 from hasselmm/packaging
May 7, 2012
f173112
Now able to use the default std::allocator instead of the custom Allo…
May 7, 2012
1df9105
Patch Config.h from CMake options
hasselmm Jul 26, 2012
4f4400b
Add CMake option for LPP_USE_ALLOCATOR
hasselmm Jul 26, 2012
4907246
Properly use LIB_DESTINATION in pkg-config files
hasselmm Jul 26, 2012
05e98a0
Also install generated Config.h
hasselmm Jul 31, 2012
e33a0ae
Merge pull request #27 from hasselmm/packaging
Aug 13, 2012
2446b8e
Amend README to reflect recent changes to CMake/Config.h
Aug 17, 2012
77077f9
Fix compilation under FreeBSD
Sep 15, 2012
41848a3
Merge pull request #28 from alesha1488/master
Sep 15, 2012
c39e211
Remove unnecessary int32_t cast.
Sep 20, 2012
5170153
Fix logic error when detecting next valid utf8 sequence.
Sep 30, 2012
31701f8
Fix MultiLevelSkipListReader::close().
Jan 31, 2013
cb36d1d
Fix logic error in MultipleTermPositions::next().
Feb 1, 2013
ca102b0
Fix for copy of compound file >2Go.
Mar 11, 2013
21645ed
Improved the README file's build instructions.
artob Mar 20, 2013
d63ba39
Merge pull request #34 from bendiken/readme-improvements
Mar 21, 2013
e3f8992
Update for boost-1.5
May 29, 2013
f185807
Update include/Config.h.cmake to have correct boost filesystem version.
May 29, 2013
6251374
Add CMake artifacts to gitignore
May 29, 2013
33e5aba
Merge pull request #35 from upthere/boost-1.5x
May 30, 2013
99facd7
The right hand side needs to be cast to int64_t before being shifted.
Jul 12, 2013
5958503
Fixed unit tests.
Jul 19, 2013
ea93d35
Disable pch in waf.
Jul 19, 2013
3b76d7c
Release version 3.0.4.
Jul 30, 2013
277b8d1
Fix segfault when recording directory listing (Marcin Junczys-Dowmunt).
Aug 27, 2013
65c63d0
Turn off custom allocator by default.
Sep 12, 2013
3d8a008
Strip symbols from shared libraries.
Sep 12, 2013
f4f7a4e
Add support for compiling with c++11.
Sep 26, 2013
4777666
Remove outdated note about Boost incompatibility from the README.
vslavik Oct 11, 2013
147c555
Merge pull request #41 from vslavik/patch-1
Oct 11, 2013
8628278
Fix races when initializing static arrays in StandardTokenizerImpl
Oct 18, 2013
ce10f9a
Merge pull request #42 from upthere/tokenizer-init-race
Oct 20, 2013
07d8d7b
Fix copy-and-paste error in TermVectorOffsetInfo::setStartOffset()
Oct 18, 2013
9386377
Fix some cases of adding integers to string literals.
Oct 18, 2013
5911693
Merge pull request #43 from upthere/clang-static-analysis
Oct 21, 2013
8b174c5
Merge pull request #44 from upthere/c++11-support
Oct 21, 2013
e82a0fc
Fix compatibility with Boost versions before 1.54
Oct 22, 2013
d009b33
Merge pull request #45 from upthere/boost-once-backwards-compat
Oct 22, 2013
523d07a
Fix StandardTokenizerImpl.cpp compilation.
Oct 22, 2013
2ac8183
Fix accidental use of operator+ instead of operator<<.
vslavik Oct 27, 2013
7a9c11e
Merge pull request #48 from vslavik/patch-1
Oct 27, 2013
dd9451b
Fix incorrect paths handling on Windows.
vslavik Dec 8, 2013
6a3254a
Merge pull request #50 from vslavik/windows-paths-fixes
Jan 27, 2014
f194708
Release version 3.0.5.
Jan 30, 2014
f588f8d
Fixed crash in TermBuffer.
Feb 7, 2014
5e53efc
Simplify build and installation.
Feb 9, 2014
c914c76
Ignore /build directory.
Feb 9, 2014
61f3293
Remove test from CMakeLists.txt.
Feb 9, 2014
dcf5b9d
Switched to using google gtest unit testing framework.
Feb 12, 2014
2c65b5a
Subversion required for building gtest.
Feb 12, 2014
59e5c65
Update copyright year and remove all trailing whitespace.
Feb 12, 2014
6a6bb82
Make all symbols visible.
Feb 12, 2014
e7a604a
Pass all Ptr (shared_ptr) arguments as const references.
Feb 18, 2014
034a03f
Pass boost::any arguments as const references.
Feb 20, 2014
6be7218
Improved pre-compiled header support.
Feb 20, 2014
131f11a
Fix compiler warnings.
Feb 20, 2014
3bc5c68
Reformatted code to a saner format.
Feb 20, 2014
c9c09bc
Release version 3.0.6.
Apr 19, 2014
b07d6ae
Rename MAX/MIN_PRIORITY to avoid conflicts on windows platform.
Apr 23, 2014
23416f7
Bug #53: Completed quoting for parameters of some CMake commands
elfring Apr 24, 2014
e7dfc15
Merge pull request #56 from elfring/Complete_quoting_for_parameters_o…
Apr 28, 2014
4c1f137
Throw exception in fixture destructor instead of FAIL().
Apr 28, 2014
a8bac06
Fix compiler warnings.
Apr 28, 2014
f27e602
Fix various compiler warnings.
vslavik May 18, 2014
994f03c
fix installing lucene++ headers in 3.0.6
May 19, 2014
c5ed014
lucene++ .pc files fix
May 19, 2014
ee3162f
Merge pull request #59 from vslavik/fix-compiler-warnings
May 19, 2014
0803bde
Fix NumericTokenStream::setDoubleValue() to use correct encoding.
vslavik May 23, 2014
eec8859
Merge pull request #60 from vslavik/fix-indexing-of-doubles
May 27, 2014
fcdcf19
enable multiarch lib location
LocutusOfBorg Jul 2, 2014
474d308
Update LuceneTestFixture.cpp
LocutusOfBorg Jul 2, 2014
e349e74
Update LuceneTestFixture.h
LocutusOfBorg Jul 2, 2014
4c533e7
Merge pull request #61 from LocutusOfBorg/patch-1
Jul 2, 2014
efa88dc
Merge pull request #62 from LocutusOfBorg/patch-3
Jul 2, 2014
ab10671
Moved Subversion requirement outside CMakeLists
LocutusOfBorg Jul 3, 2014
7050236
Merge pull request #64 from LocutusOfBorg/master
Jul 3, 2014
83356d9
Embed gtest in source tree instead of fetching from subversion.
Jul 10, 2014
93a2f6d
Update Lucene++Docs.cmake
LocutusOfBorg Jul 10, 2014
c9ba42c
Merge pull request #67 from LocutusOfBorg/patch-1
Jul 10, 2014
8f2bb90
Moving into -doc directory, the best location for a doxygen documenta…
LocutusOfBorg Jul 10, 2014
7741f9e
Merge pull request #68 from LocutusOfBorg/patch-1
Jul 10, 2014
a385bcf
Upgrade cotire to 1.6.3.
Jul 10, 2014
8c05fcd
Upgrade cotire to 1.6.4 to fix warnings when building on Ubuntu.
Jul 15, 2014
cd9a313
fix some warnings on mingw
TheOneRing Sep 16, 2014
9190558
fixed build on mingw, the automatic linking of the boost dependencies
TheOneRing Sep 16, 2014
de23181
make test optional
TheOneRing Sep 16, 2014
6f29f1d
Merge pull request #72 from TheOneRing/warnings
Oct 2, 2014
60f7849
Merge pull request #73 from TheOneRing/mingw
Oct 2, 2014
62460ef
Merge pull request #74 from TheOneRing/optional_tests
Oct 2, 2014
b295c2f
Fix build failure with debian kfreebsd and hurd
LocutusOfBorg Oct 10, 2014
985d147
Merge pull request #76 from LocutusOfBorg/patch-1
Oct 11, 2014
c80d05a
Fix cmake gtest.
Nov 7, 2014
a564d10
Make building demo applications optional.
Nov 8, 2014
1d5b6a4
Update cotire to 1.6.6.
Nov 8, 2014
b89c5a9
Attempt to fix compile cstdint.hpp errors.
Nov 8, 2014
ab7b4e3
Don't throw exceptions in file operations just to ignore them.
vadz Oct 28, 2014
74ef192
Fix crash in StandardTokenizer if wchar_t is 32bit
vslavik Nov 20, 2014
e096d4d
Disables boost auto linking when using the MSVC generator
zsims Jan 13, 2015
e516210
Updated style per rest of CMakeLists.txt
zsims Jan 13, 2015
dd56e9d
Enables C++ exceptions when generating VS projects
zsims Jan 13, 2015
a918c03
Merge pull request #78 from vadz/file-no-except
Jan 30, 2015
6b94b09
Merge pull request #82 from vslavik/fix-analyzer-crash
Jan 30, 2015
634874a
Merge pull request #84 from zsims/disable_boost_autolink
Jan 30, 2015
b09f219
Added licensing clarification for glib code.
Jan 30, 2015
35de024
Whitespace.
Jan 30, 2015
4d28f9f
Release version 3.0.7.
Jan 30, 2015
972c9cb
Fix FSDirectory::sync() to sync writes to disk
vslavik Feb 3, 2015
a02e5b6
minor fix to allow full lines to be input to demo queries
Mar 24, 2015
126821f
Modified build for VS2010 - added new style VS project files (.vcxproj)
Mar 24, 2015
f83f2db
better formatting
Mar 24, 2015
197d63a
Merge pull request #88 from vslavik/implement-fsync
Mar 25, 2015
3c041a9
Merge pull request #90 from gbjbaanb/master
Mar 27, 2015
229f783
Use maxSize of BooleanQuery as base for the queue size
xhochy Apr 6, 2015
03eb53c
Merge pull request #91 from xhochy/scoretermqueue-indexoutofbounds
Apr 6, 2015
dd6ba76
Fix packageconfig path.
LocutusOfBorg Apr 28, 2015
42b7e75
Merge pull request #94 from LocutusOfBorg/fix-pc-path
Apr 28, 2015
1987082
Fix compilation with Boost 1.58
vslavik May 4, 2015
a64e24f
Merge pull request #96 from vslavik/fix-boost1.58
May 9, 2015
afd772b
Fix segfault when unit tests are complete.
Jul 16, 2015
c32e560
Make use of boost integer types optional.
Aug 14, 2015
f93136e
Link against `libboost_system` when building demo
fish2000 Aug 14, 2015
7359e95
Work around clang warning about side effects inside typeid()
vslavik Oct 10, 2015
96e9cee
Fix Visual Studio 2015 warnings
vslavik Mar 23, 2016
166955e
Merge pull request #105 from vslavik/fix-vs2015-warnings
Mar 25, 2016
d6bd1e6
Merge pull request #103 from vslavik/fix-clang-typeid-warning
Mar 25, 2016
6aec070
Merge pull request #102 from fish2000/patch-1
Mar 25, 2016
1cdc36d
add scorer visitor interface
rsravanreddy Aug 18, 2017
0e94cff
implement scorer visitor
rsravanreddy Aug 18, 2017
ed86432
add frequencies to scorers
rsravanreddy Aug 18, 2017
763bdde
rename term_freq -> termFreq
rsravanreddy Feb 10, 2018
b7baba5
Merge pull request #110 from ThinAir/master
Feb 12, 2018
885ba74
* update cotire.cmake \n * fix header includes \n * fix the boost lin…
segv01 Nov 12, 2018
f1169f6
Handle all non-BMP chars as letters
josh-stoddard-tanium Mar 6, 2019
9e7ea78
fix improper override
josh-stoddard-tanium Mar 7, 2019
bac5891
Merge pull request #115 from mazl123321/fix_mac_issue
Mar 7, 2019
96b5f8f
Merge pull request #116 from josh-stoddard-tanium/non-BMP
Mar 7, 2019
e6feb35
Merge pull request #117 from josh-stoddard-tanium/bad-override
Mar 7, 2019
72dac36
fix query parse with no position increment
josh-stoddard-tanium Mar 14, 2019
df37106
fix stem filter
josh-stoddard-tanium Mar 25, 2019
c3602b3
port of LUCENE-5503 fix
josh-stoddard-tanium Mar 26, 2019
afa8a41
Assign lockFile value in SimpleFSLock constructor
vslavik Apr 20, 2019
ef88754
Fix unescaped backslash in path in README.rst
Aug 13, 2019
6b00de1
Merge pull request #125 from mtaylor76/master
Aug 14, 2019
fa4d82e
Merge pull request #121 from vslavik/SimpleFSLock-ctor-fix
Aug 14, 2019
fd96792
Merge pull request #118 from josh-stoddard-tanium/query-parser
Aug 14, 2019
406fef4
Merge pull request #119 from josh-stoddard-tanium/stemmer
Aug 14, 2019
65e230d
Merge pull request #120 from josh-stoddard-tanium/LUCENE-5503
Aug 14, 2019
0b97cc3
Don't retain input file handles (#4)
josh-stoddard-tanium Jun 21, 2019
cf44426
Propagate errors reading input files (#5)
josh-stoddard-tanium Jul 10, 2019
98f7357
Merge pull request #128 from josh-stoddard-tanium/input_fh
Aug 15, 2019
692390d
Merge pull request #129 from josh-stoddard-tanium/read_errors
Aug 15, 2019
ae9120a
Use CMAKE_CURRENT_SOURCE_DIR for CMAKE_MODULE_PATH
revl May 9, 2020
7a7773b
Merge pull request #133 from revl/fix-cmake-module-path
alanw May 14, 2020
51751e5
Add LUCENE_BUILD_STATIC option
merwaaan Jun 12, 2020
75a5fe2
Define WIN32_LEAN_AND_MEAN and NOMINMAX via CMake
merwaaan Jun 15, 2020
f33553e
Fix std::unary_function missing from C++17
merwaaan Jun 15, 2020
9c07bb0
Merge pull request #135 from lindale-dev/cmake-static-build
alanw Jun 20, 2020
7a2c41e
Merge pull request #136 from lindale-dev/fix-contrib-nominmax
alanw Jun 20, 2020
d45f3d4
Merge pull request #137 from lindale-dev/fix-deprecated-unary-function
alanw Jun 20, 2020
f6ba1f4
added BOOST_USE_WINDOWS_H to config.h
Jul 14, 2020
78e4b62
Merge pull request #138 from p01arst0rm/config-update
alanw Jul 14, 2020
8c62682
added LPPAPI definitions missing in headers
Aug 2, 2020
4555788
Merge pull request #140 from p01arst0rm/visibility-fixes
alanw Aug 3, 2020
a870797
added missing WIN32_LEAN_AND_MEAN definition to demos
Aug 7, 2020
00354e3
Merge pull request #142 from p01arst0rm/fix-demo
alanw Aug 7, 2020
e5673ea
fixed missing LPPAPI definitions
Aug 9, 2020
cb8209b
updated gtest
Aug 9, 2020
7710671
Merge pull request #144 from p01arst0rm/updated-gtest
alanw Aug 13, 2020
3c6884a
Merge pull request #143 from p01arst0rm/fix-visibility
alanw Aug 13, 2020
377dc9e
rebuilt cmake buildsystem
Aug 14, 2020
d40b6ca
Force compilation with C++11.
Aug 16, 2020
8e56a5a
Revert: Don't retain input file handles #128
Aug 16, 2020
9fe7860
Merge pull request #148 from p01arst0rm/cmake-rebuild
alanw Aug 17, 2020
6f303e0
fixed typos
Aug 17, 2020
4be3780
fixed test binary compilation on msvc
Aug 18, 2020
732feb2
added advanced flags to documentation options
Aug 19, 2020
dc486d0
Merge pull request #149 from p01arst0rm/fix-typo
alanw Aug 21, 2020
74f2fea
Merge pull request #150 from p01arst0rm/fix-msvc-test
alanw Aug 21, 2020
6a22d02
Merge pull request #151 from p01arst0rm/add-advanced-flags
alanw Aug 21, 2020
77330d9
updated readme
Aug 23, 2020
42f266d
Merge pull request #153 from p01arst0rm/update-readme
alanw Aug 23, 2020
4536957
updated build information
Aug 25, 2020
e57c4dd
relocated doxygen files
Aug 25, 2020
4eeb9bc
Merge pull request #155 from p01arst0rm/update-doxygen-location
alanw Sep 1, 2020
9a48a2a
Merge pull request #154 from p01arst0rm/update-build-info
alanw Sep 1, 2020
fd9eaf1
Title:fix a bug of ChineseTokenizer
Kakueeen Dec 4, 2020
0535a06
Update README.md
alanw Dec 29, 2020
df65bf5
Release version 3.0.8.
Dec 29, 2020
127492f
Merge pull request #160 from Kakueeen/master
alanw Dec 29, 2020
5c06dc5
CMakeLists.txt: fix typo preventing lucene++-contrib library symlink …
LocutusOfBorg Jan 4, 2021
39cd44b
pkgconfig: use correct LIBDIR for destination library
LocutusOfBorg Jan 4, 2021
1cd2509
Fix various cmake issues:
LocutusOfBorg Jan 4, 2021
4b5ba61
Merge pull request #161 from LocutusOfBorg/patch-1
alanw Jan 5, 2021
c6756c9
Merge pull request #162 from LocutusOfBorg/pkgconfig
alanw Jan 5, 2021
8c2ce8d
Merge pull request #163 from LocutusOfBorg/cmake
alanw Jan 5, 2021
973345a
updated fpic definition
Feb 17, 2021
b12f069
Merge pull request #166 from p01arst0rm/update-fpic
alanw Mar 5, 2021
0739c90
fix: fix a unit test error
GongHeng2017 Mar 8, 2021
9eb5e63
Merge pull request #169 from GongHeng2017/master
alanw Mar 8, 2021
84163f7
small cmake fixes
May 20, 2021
2e9ddcc
Merge pull request #172 from p01arst0rm/cmake-bugfixes
alanw May 26, 2021
ad09039
Fix headers install, contrib headers should be installed.
hillwoodroc Jun 8, 2021
57b2dd2
Merge pull request #173 from hillwoodroc/master
alanw Jun 8, 2021
8d82fd9
Fix src/contrib/CMakeLists.txt
hillwoodroc Jul 11, 2021
a22b136
Fix syntax in src/config/contrib/CMakeLists.txt: an incorrect "{"
hillwoodroc Jul 12, 2021
b05729e
Merge pull request #174 from hillwoodroc/master
alanw Jul 13, 2021
5e5717e
Fix cmake errors
chenyang8094 Jul 28, 2021
3e94f77
Merge pull request #176 from chenyang8094/fix-compile-error
alanw Jul 28, 2021
ac4abb3
opt call func
FishermanZzhang Sep 4, 2021
23cb39f
removing comment-out code,
FishermanZzhang Sep 12, 2021
98e87c3
Merge pull request #179 from FishermanZzhang/opt_query
alanw Sep 12, 2021
20c9369
Fix race conditions when initializing static variables. (Fix for issu…
kmatheussen Dec 8, 2021
6fe51e5
Merge pull request #183 from kmatheussen/master
alanw Dec 9, 2021
bc43684
add LPPAPI to Exception Template to fix it's visibility on mac
Dec 9, 2021
4fb8e5f
Merge pull request #185 from dishti/master
alanw Jan 4, 2022
a0fdea9
Make contrib library configurable
fwuehr95 Feb 8, 2023
9e74511
Merge pull request #192 from fwuehr95/master
alanw Feb 8, 2023
3d5c428
Fix non symlink so issue with contrib library
fwuehr95 Mar 3, 2023
a862fe3
Merge pull request #194 from fwuehr95/master
alanw Mar 9, 2023
b545dba
Release version 3.0.9.
alanw Feb 18, 2024
f40f59c
Fix install path for liblucene++.pc
barracuda156 Mar 14, 2024
a460863
Merge pull request #202 from barracuda156/pkgconfig
alanw Mar 27, 2024
c18ead2
Fix build with boost 1.85.0
berolinux Mar 27, 2024
76dc90f
Merge pull request #203 from berolinux/bero/fix-boost-1.85
alanw Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 36 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
*.cmd
*.suo
*.ncb
*.idb
*.obj
*.opt
*.pch
*.idb
*.obj
*.opt
*.pch
*.pyc
*.log
*.exe
Expand All @@ -21,6 +21,10 @@
*.manifest
*.user
*.bak
*.orig
*.lock*
*.waf*
.DS_Store
bin/*
src/msvc/Debug DLL
src/msvc/Debug Static
Expand Down Expand Up @@ -51,3 +55,31 @@ src/demo/searchfiles/msvc/Release DLL
src/demo/searchfiles/msvc/Release Static
src/demo/searchfiles/msvc/Debug DLL
src/demo/searchfiles/msvc/Debug Static
CMakeCache.txt
CMakeFiles/
build/
CTestTestfile.cmake
Makefile
cmake_install.cmake
cmake_uninstall.cmake
include/Config.h
install_manifest.txt
liblucene++-contrib.pc
liblucene++.pc
src/contrib/CMakeFiles/
src/contrib/CTestTestfile.cmake
src/contrib/Makefile
src/contrib/cmake_install.cmake
src/core/CMakeFiles/
src/core/CTestTestfile.cmake
src/core/Makefile
src/core/cmake_install.cmake
src/demo/CMakeFiles/
src/demo/CTestTestfile.cmake
src/demo/Makefile
src/demo/cmake_install.cmake
src/test/CMakeFiles/
src/test/CTestTestfile.cmake
src/test/Makefile
src/test/cmake_install.cmake

259 changes: 101 additions & 158 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,191 +1,134 @@
project(lucene++-base)

####################################
# VERSION information
#These versions match the Lucene version
SET(LUCENE++_VERSION_MAJOR "3")
SET(LUCENE++_VERSION_MINOR "0")
SET(LUCENE++_VERSION_REVISION "3")
SET(LUCENE++_VERSION_PATCH "4")

# SOVERSION information
#Must be incremented for releases if the api is not backwards compatible
SET(LUCENE++_SOVERSION "0")

#derived versions
MATH(EXPR LUCENE++_INT_VERSION "(${LUCENE++_VERSION_MAJOR} * 1000000) + (${LUCENE++_VERSION_MINOR} * 10000) + (${LUCENE++_VERSION_REVISION} * 100) + (${LUCENE++_VERSION_PATCH} * 1)" )
SET(LUCENE++_VERSION "${LUCENE++_VERSION_MAJOR}.${LUCENE++_VERSION_MINOR}.${LUCENE++_VERSION_REVISION}.${LUCENE++_VERSION_PATCH}")
MESSAGE(${LUCENE++_INT_VERSION})
MESSAGE(${LUCENE++_VERSION})

# init
####################################

####################################
# Build system options and includes
####################################
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
#build policies
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
cmake_minimum_required(VERSION 3.5)

# include specific modules
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

#if setup using the Toolchain-llvm.cmake file, then use llvm...
IF ( ENABLE_LLVM )
INCLUDE (Toolchain-llvm)
ENDIF ( ENABLE_LLVM )

#define options...
INCLUDE (Lucene++Docs)
INCLUDE (FindThreads)
INCLUDE (TestCXXAcceptsFlag)
ENABLE_TESTING()

#Single output directory for building all executables and libraries.
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Executable Output Directory" FORCE)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE PATH "Library Output Directory" FORCE)
####################################
project(lucene++)

####################################
#user specified build options
####################################
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
ELSE(NOT CMAKE_BUILD_TYPE)
MESSAGE( "Compiling as ${CMAKE_BUILD_TYPE}" )
ENDIF(NOT CMAKE_BUILD_TYPE)

OPTION(ENABLE_PACKAGING
"create build scripts for creating lucene++ packages"
OFF)
OPTION(ENABLE_NEDMALLOC
"use nedmalloc for memory allocations"
OFF)
OPTION(LUCENE_USE_STATIC_BOOST_LIBS
"use static boost libraries "
OFF)
OPTION(ENABLE_CYCLIC_CHECK
"enable cyclic checking "
OFF)

#install path options
SET(LIB_DESTINATION "lib" CACHE STRING "Define lib output directory name")

IF ( ENABLE_NEDMALLOC )
ADD_DEFINITIONS(-DLPP_USE_NEDMALLOC)
ENDIF ( ENABLE_NEDMALLOC )
IF ( ENABLE_CYCLIC_CHECK )
ADD_DEFINITIONS(-DLPP_USE_CYCLIC_CHECK)
ENDIF ( ENABLE_CYCLIC_CHECK )
####################################
set(lucene++_VERSION_MAJOR 3)
set(lucene++_VERSION_MINOR 0)
set(lucene++_VERSION_PATCH 9)
set(lucene++_SOVERSION "0")

set(lucene++_VERSION
"${lucene++_VERSION_MAJOR}.${lucene++_VERSION_MINOR}.${lucene++_VERSION_PATCH}")


# set default build type as release
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()

set(LIB_DESTINATION
"${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Define lib output directory name")


####################################
# PLATFORM specific options
# CMake Modules
####################################
#add a debug build postfix
if(WIN32 OR WIN64)
set(CMAKE_DEBUG_POSTFIX "d")
endif(WIN32 OR WIN64)

if(NOT MSVC AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.")
add_definitions(-fPIC)
endif(NOT MSVC AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.")
# include specific modules
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(options.cmake)

# pre-compiled headers support
include(cotire)

INCLUDE(MacroCheckGccVisibility)
MACRO_CHECK_GCC_VISIBILITY(LPP_HAVE_GXXCLASSVISIBILITY)
if ( LPP_HAVE_GXXCLASSVISIBILITY )
ADD_DEFINITIONS(-DLPP_HAVE_GXXCLASSVISIBILITY)
# if setup using the Toolchain-llvm.cmake file, then use llvm...
if(ENABLE_LLVM)
include(Toolchain-llvm)
endif()

IF(CYGWIN)
ADD_DEFINITIONS(-D__LARGE64_FILES)
ENDIF(CYGWIN)

#set ansi mode
SET(ENABLE_ANSI_MODE OFF)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(ENABLE_ANSI_MODE ON)

#exceptions:
IF(MINGW OR CYGWIN)
SET(ENABLE_ANSI_MODE OFF)
ENDIF(MINGW OR CYGWIN)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
IF ( CMAKE_COMPILER_IS_GNUCC )
IF( ENABLE_ANSI_MODE )
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi")
ENDIF ( ENABLE_ANSI_MODE )
ENDIF(CMAKE_COMPILER_IS_GNUCC)
# fetch dependencies
include(dependencies)

####################################
#find boost
####################################
SET(Boost_USE_STATIC_LIBS ${LUCENE_USE_STATIC_BOOST_LIBS})
SET(Boost_USE_MULTITHREADED ON)
#Boost 1.38 required for bug fixes in basic_streambuf.
#The following line fails in earlier builds, so if altered, may allow older versions of boost:
#boost::gregorian::date date = parser.parse_date(paddedDate.c_str(), dateFormat->c_str(), svp);
find_package( Boost 1.38.0 COMPONENTS date_time filesystem iostreams regex system thread unit_test_framework REQUIRED)
IF (Boost_FOUND)
MESSAGE( STATUS "boost found: includes in ${Boost_INCLUDE_DIRS}, library in ${Boost_LIBRARY_DIRS}")
SET(LUCENE_BOOST_LIBS
${Boost_FILESYSTEM_LIBRARY_RELEASE}
${Boost_IOSTREAMS_LIBRARY_RELEASE}
${Boost_REGEX_LIBRARY_RELEASE}
${Boost_SYSTEM_LIBRARY_RELEASE}
${Boost_THREAD_LIBRARY_RELEASE})
ENDIF (Boost_FOUND)
# build docs
include(Lucene++Docs)

# Enable C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

####################################
# Pre-Compiled headers
# platform specific options
####################################
INCLUDE(PCHSupport)
if(WIN32 OR WIN64)
set(CMAKE_DEBUG_POSTFIX "d")
endif()

#todo: make this optional and make it possible to add more headers - like boost threads
if(MSVC)
# Disable automatic boost linking on Windows as libraries are added to the linker explicitly
add_definitions(-DBOOST_ALL_NO_LIB)

# enable exceptions, see http://msdn.microsoft.com/en-us/library/1deeycx5.aspx
add_definitions(-EHsc)

####################################
# The subdirs
####################################
#include sub-projects
ADD_SUBDIRECTORY (src/core)
ADD_SUBDIRECTORY (src/contrib EXCLUDE_FROM_ALL)
ADD_SUBDIRECTORY (src/demo EXCLUDE_FROM_ALL)
ADD_SUBDIRECTORY (src/test)
# Disable including too many Windows headers
add_definitions(-DWIN32_LEAN_AND_MEAN)

# Disable the min/max macros that conflict with std::min/std::max
add_definitions(-DNOMINMAX)
endif()

#################################
# install pkg-config file
#################################
IF(NOT WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/liblucene++.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/liblucene++.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblucene++.pc
DESTINATION ${LIB_DESTINATION}/pkgconfig )
ENDIF(NOT WIN32)
if(NOT WIN32 AND NOT CMAKE_SYSTEM MATCHES "SunOS-5*.")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

if(CYGWIN)
add_definitions(-D__LARGE64_FILES)
endif()

if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
endif()


####################################
# Custom targets
# custom targets
####################################
#add uninstall command
CONFIGURE_FILE(
configure_file(
"${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
IMMEDIATE @ONLY
)

add_custom_target(
uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
VERBATIM
)

if(ENABLE_PACKAGING)
include(CreateLucene++Packages)
endif()


####################################
# Finalise build script
# bootstrap
####################################

#this must go last...
IF (ENABLE_PACKAGING)
INCLUDE(CreateLucene++Packages)
ENDIF ( ENABLE_PACKAGING)
include(TestCXXAcceptsFlag)
include(GNUInstallDirs)

add_subdirectory(include)
add_subdirectory(src)

message("\n\n** Build Summary **")
message(" Version: ${lucene++_VERSION}")
message(" Prefix: ${CMAKE_INSTALL_PREFIX}")
message(" Build Type: ${CMAKE_BUILD_TYPE}")
message(" Architecture: ${CMAKE_SYSTEM_PROCESSOR}")
message(" System: ${CMAKE_SYSTEM_NAME}")
message(" Boost Include: ${Boost_INCLUDE_DIRS}")
message(" Boost Libraries: ${Boost_LIBRARY_DIRS}")
message(" Zlib Include: ${ZLIB_INCLUDE_DIRS}")
message(" Zlib Library: ${ZLIB_LIBRARY_RELEASE}")
Loading