Skip to content

Commit

Permalink
Added a config.h file for demo. At the moment this just detects getti…
Browse files Browse the repository at this point in the history
…meofday, but can be expanded to whatever is required.

git-svn-id: https://clucene.svn.sourceforge.net/svnroot/clucene/branches/lucene2_3_2@2734 20ef185c-fe11-0410-a618-ba9304b01011
  • Loading branch information
ustramooner committed Jul 4, 2008
1 parent e0db6c3 commit eb07acb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ADD_DEFINITIONS(${EXTRA_OPTIONS})

INCLUDE_DIRECTORIES( ${clucene-demo_SOURCE_DIR} )

CHECK_FUNCTION_EXISTS (gettimeofday _CL_HAVE_GETTIMEOFDAY)
CONFIGURE_FILE(${cl_demo_SOURCE_DIR}/config.h.cmake ${cl_demo_BINARY_DIR}/config.h)

file(GLOB_RECURSE HEADERS ${CMAKE_SOURCE_DIR}/test/*.h)

Expand Down
2 changes: 1 addition & 1 deletion src/demo/IndexFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void indexDocs(IndexWriter* writer, char* directory) {
struct dirent* fl;

char path[CL_MAX_DIR];
_snprintf(path,CL_MAX_DIR,"%s/",directory);
snprintf(path,CL_MAX_DIR,"%s/",directory);
char* pathP = path + strlen(path);

fl = readdir(dir);
Expand Down
6 changes: 6 additions & 0 deletions src/demo/config.h.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef _CLUCENE_DEMO_CONFIG_H
#define _CLUCENE_DEMO_CONFIG_H

#cmakedefine _CL_HAVE_GETTIMEOFDAY

#endif
1 change: 1 addition & 0 deletions src/demo/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <stdio.h>
#include "demo/config.h"
//#include <tchar.h>

#define CL_MAX_DIR 1024
Expand Down

0 comments on commit eb07acb

Please sign in to comment.