summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Adamansky <adamansky@gmail.com>2015-03-05 23:30:41 +0600
committerAnton Adamansky <adamansky@gmail.com>2015-03-05 23:30:41 +0600
commit4158e81757a55b35fc196be95dbc83c1bac485f5 (patch)
treef90c301e4fb9c7f59ac7b1ba73be67cb969cb11e
parent4e51553541fdb26593d7bea09b989fb53446758a (diff)
downloadejdb-4158e81757a55b35fc196be95dbc83c1bac485f5.tar.gz
ejdb-4158e81757a55b35fc196be95dbc83c1bac485f5.tar.bz2
ejdb-4158e81757a55b35fc196be95dbc83c1bac485f5.zip
#115
-rw-r--r--.gitignore3
-rw-r--r--ejdb.workspace19
-rw-r--r--tcejdb/.gitignore5
-rw-r--r--tcejdb/CMakeLists.txt93
-rw-r--r--tcejdb/CPack.cmake0
-rw-r--r--tcejdb/cmake/Modules/EjdbDebCpack.cmake0
-rw-r--r--tcejdb/src/basedefs.h.in2
-rw-r--r--tcejdb/src/ejdb/tests/CMakeLists.txt2
-rw-r--r--tcejdb/src/tcbdb/tests/CMakeLists.txt3
-rw-r--r--tcejdb/src/tcbdb/tools/CMakeLists.txt4
-rw-r--r--tcejdb/src/tcfdb/tests/CMakeLists.txt5
-rw-r--r--tcejdb/src/tcfdb/tools/CMakeLists.txt3
-rw-r--r--tcejdb/src/tchdb/tests/CMakeLists.txt3
-rw-r--r--tcejdb/src/tchdb/tools/CMakeLists.txt2
-rw-r--r--tcejdb/src/tctdb/tests/CMakeLists.txt4
-rw-r--r--tcejdb/src/tctdb/tools/CMakeLists.txt2
-rw-r--r--tcejdb/src/tcutil/tests/CMakeLists.txt9
-rw-r--r--tcejdb/tcejdb.project164
-rw-r--r--tcejdb/win64-tc.cmake22
19 files changed, 197 insertions, 148 deletions
diff --git a/.gitignore b/.gitignore
index 3fd592e..9a1b222 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+/build-*/
+/Makefile
+
CMakeCache.txt
CMakeFiles
diff --git a/ejdb.workspace b/ejdb.workspace
index b73af78..0b194ce 100644
--- a/ejdb.workspace
+++ b/ejdb.workspace
@@ -1,24 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeLite_Workspace Name="ejdb" Database="./ejdb.tags">
+ <Project Name="tcejdb" Path="tcejdb/tcejdb.project" Active="Yes"/>
<Environment>
<![CDATA[]]>
</Environment>
- <Project Name="tcejdb" Path="tcejdb/tcejdb.project" Active="Yes"/>
<BuildMatrix>
- <WorkspaceConfiguration Name="Debug" Selected="yes">
- <Project Name="tcejdb" ConfigName="Debug"/>
- <Project Name="" ConfigName="Debug_Linux"/>
- <Project Name="tcejdb" ConfigName="Debug_Linux"/>
- </WorkspaceConfiguration>
- <WorkspaceConfiguration Name="Release" Selected="yes">
- <Project Name="tcejdb" ConfigName="Release"/>
- <Project Name="" ConfigName="Debug_Linux"/>
- <Project Name="tcejdb" ConfigName="Debug_Linux"/>
+ <WorkspaceConfiguration Name="win64-dbg" Selected="yes">
+ <Project Name="tcejdb" ConfigName="win64-dbg"/>
</WorkspaceConfiguration>
- <WorkspaceConfiguration Name="winedbg" Selected="yes">
- <Project Name="tcejdb" ConfigName="winedbg"/>
- <Project Name="" ConfigName="Debug_Linux"/>
- <Project Name="tcejdb" ConfigName="Debug_Linux"/>
+ <WorkspaceConfiguration Name="nix-dbg" Selected="no">
+ <Project Name="tcejdb" ConfigName="nix-dbg"/>
</WorkspaceConfiguration>
</BuildMatrix>
</CodeLite_Workspace>
diff --git a/tcejdb/.gitignore b/tcejdb/.gitignore
index 7e47b9d..7f0a7a6 100644
--- a/tcejdb/.gitignore
+++ b/tcejdb/.gitignore
@@ -1,4 +1,9 @@
Makefile
+
+/.cmake_dirty
+/tcejdb.mk
+
+
build/*
Testing/*
src/old/*
diff --git a/tcejdb/CMakeLists.txt b/tcejdb/CMakeLists.txt
index 4ea35a5..f774572 100644
--- a/tcejdb/CMakeLists.txt
+++ b/tcejdb/CMakeLists.txt
@@ -1,13 +1,14 @@
cmake_minimum_required(VERSION 3.0)
set(PROJECT_NAME "ejdb")
-option(BUILD_SHARED_LIBS "Build shared libraries" ON)
-option(BUILD_TESTS "Build EJDB test cases" OFF)
-
project(${PROJECT_NAME}
VERSION 1.2.0
LANGUAGES C)
-
+
+option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+option(BUILD_TESTS "Build EJDB test cases" OFF)
+#option(TEST_TOOL_CMD "Test tool command", "")
+
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_C_COMPILER_VERSION VERSION_LESS 4.7)
message(FATAL_ERROR "GCC version must be at least 4.7!")
@@ -41,6 +42,10 @@ set(MODULES tcutil tchdb tcbdb tctdb tcfdb bson ejdb)
set(EJDB_GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/generated)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckLibraryExists)
+include(InstallRequiredSystemLibraries)
include(EjdbUtils)
macro_ensure_out_of_source_build(
@@ -63,12 +68,13 @@ foreach(MODULE IN LISTS MODULES)
endforeach(MODULE)
add_library(ejdb SHARED ${ALL_SRC})
-if (NOT ENABLE_SHARED)
+if (NOT BUILD_SHARED_LIBS)
add_definitions(-DEJDB_NODLL)
endif()
add_library(ejdb_p STATIC ${ALL_SRC})
+
find_package(Threads REQUIRED CMAKE_THREAD_PREFER_PTHREAD)
if (CMAKE_USE_WIN32_THREADS_INIT)
add_definitions(-D_TC_WIN32_THREADS)
@@ -77,7 +83,10 @@ elseif (CMAKE_USE_PTHREADS_INIT)
else()
mesage(FATAL_ERROR "Unable to find suitable threading library")
endif(CMAKE_USE_WIN32_THREADS_INIT)
-list(APPEND EJDB_LLIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+
+if (NOT WIN32)
+ list(APPEND EJDB_LLIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+endif()
find_library(M_LIB m)
if (NOT M_LIB)
@@ -109,7 +118,43 @@ if (LZO_FOUND)
list(APPEND EJDB_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
endif(LZO_FOUND)
-include(CheckIncludeFile)
+if (WIN32)
+ check_include_file(windows.h HAVE_WINDOWS_H)
+ if (NOT HAVE_WINDOWS_H)
+ message(FATAL_ERROR "Unable to find windows.h include file")
+ endif()
+ check_include_file(time.h HAVE_TIME_H)
+ if (NOT HAVE_TIME_H)
+ message(FATAL_ERROR "Unable to find time.h include file")
+ endif()
+ check_include_file(pcre.h HAVE_PCRE_H)
+ if (NOT HAVE_PCRE_H)
+ message(FATAL_ERROR "Unable to find pcre.h include file")
+ endif()
+ check_include_file(pcreposix.h HAVE_PCREPOSIX_H)
+ if (NOT HAVE_PCREPOSIX_H)
+ message(FATAL_ERROR "Unable to find pcreposix.h include file")
+ endif()
+ check_library_exists(pcre pcre_compile "" HAVE_PCRE_LIB)
+ #check_library_exists(pcreposix regexec "" HAVE_PCREPOSIX_LIB)
+ if (NOT HAVE_PCRE_LIB)
+ message(FATAL_ERROR "Unable to find pcre lib")
+ endif()
+ check_library_exists(winpthread pthread_exit "" HAVE_WINPTHREAD)
+ if (NOT HAVE_WINPTHREAD)
+ message(FATAL_ERROR "Unable to winpthread lib")
+ endif()
+ list(INSERT EJDB_LLIBRARIES 0 -lwinpthread -lpcreposix -lpcre)
+ add_definitions(-DPCRE_STATIC)
+
+else()
+
+ check_include_file(glob.h HAVE_GLOB_H)
+ if (NOT HAVE_GLOB_H)
+ message(FATAL_ERROR "Unable to find glob.h include file")
+ endif()
+endif(WIN32)
+
foreach(HF IN ITEMS stdlib stdint unistd dirent stddef)
string(TOUPPER "${HF}" UHF)
check_include_file(${HF}.h "_TC_HAVE_${UHF}")
@@ -127,10 +172,15 @@ target_link_libraries(ejdb_p ${EJDB_LLIBRARIES})
#todo check the host system!
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fsigned-char -pedantic")
-set(CMAKE_C_FLAGS_DEBUG "-O0 -Wfatal-errors -Werror -DDEBUG -D_DEBUG -UNDEBUG")
-set(CMAKE_C_FLAGS_RELEASE "-O3 -Wfatal-errors -DNDEBUG")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -fsigned-char -pedantic -Wfatal-errors")
+set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Werror -DDEBUG -D_DEBUG -UNDEBUG")
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -D_DEBUG -UNDEBUG")
+
+if (WIN32)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pedantic-ms-format")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
+endif(WIN32)
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
@@ -185,7 +235,7 @@ set_target_properties(ejdb PROPERTIES
set_target_properties(ejdb_p PROPERTIES
VERSION ${ejdb_VERSION}
- DEFINE_SYMBOL EJDB_NODLL)
+ COMPILE_FLAGS "-DEJDB_NODLL")
install(TARGETS ejdb
EXPORT ejdb-exports
@@ -198,17 +248,20 @@ install(TARGETS ejdb
install(EXPORT ejdb-exports
DESTINATION ${LIB_INSTALL_DIR}/${PROJECT_NAME})
-export(EXPORT ejdb-exports)
+export(EXPORT ejdb-exports)
-include(InstallRequiredSystemLibraries)
+#todo if
+include(EjdbDebCpack)
message("")
message("#############################################")
-message(" BUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
-message(" BUILD_TESTS: ${BUILD_TESTS}")
-message(" LINK LIBS: ${EJDB_LLIBRARIES}")
-message(" INCLUDE DIRS: ${EJDB_INCLUDE_DIRS}")
-message(" SOURCES: ${ALL_SRC}")
-message(" PUB_HDRS: ${PUB_HDRS}")
+message("CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+message("\nBUILD_SHARED_LIBS: ${BUILD_SHARED_LIBS}")
+message("\nBUILD_TESTS: ${BUILD_TESTS}")
+message("\nLINK LIBS: ${EJDB_LLIBRARIES}")
+message("\nINCLUDE DIRS: ${EJDB_INCLUDE_DIRS}")
+message("\nSOURCES: ${ALL_SRC}")
+message("\nPUB_HDRS: ${PUB_HDRS}")
message("#############################################")
message("")
+
diff --git a/tcejdb/CPack.cmake b/tcejdb/CPack.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tcejdb/CPack.cmake
diff --git a/tcejdb/cmake/Modules/EjdbDebCpack.cmake b/tcejdb/cmake/Modules/EjdbDebCpack.cmake
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tcejdb/cmake/Modules/EjdbDebCpack.cmake
diff --git a/tcejdb/src/basedefs.h.in b/tcejdb/src/basedefs.h.in
index ea82111..055486a 100644
--- a/tcejdb/src/basedefs.h.in
+++ b/tcejdb/src/basedefs.h.in
@@ -38,7 +38,7 @@ EJDB_EXTERN_C_START
#endif
#if (defined(_WIN32) || defined(_WIN64))
-# ifdef EJDB_NODLL
+# if (defined(EJDB_NODLL) || defined(EJDB_STATIC))
# define EJDB_EXPORT
# else
# ifdef EJDB_API_EXPORTS
diff --git a/tcejdb/src/ejdb/tests/CMakeLists.txt b/tcejdb/src/ejdb/tests/CMakeLists.txt
index 8729789..fb36af8 100644
--- a/tcejdb/src/ejdb/tests/CMakeLists.txt
+++ b/tcejdb/src/ejdb/tests/CMakeLists.txt
@@ -4,6 +4,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TEST_DATA_DIR})
foreach(TC RANGE 1 5)
add_executable(ejdbtest${TC} ejdbtest${TC}.c)
+ set_target_properties(ejdbtest${TC} PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
add_test(NAME ejdbtest${TC} WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:ejdbtest${TC}>)
endforeach()
diff --git a/tcejdb/src/tcbdb/tests/CMakeLists.txt b/tcejdb/src/tcbdb/tests/CMakeLists.txt
index 6c534e8..0014eea 100644
--- a/tcejdb/src/tcbdb/tests/CMakeLists.txt
+++ b/tcejdb/src/tcbdb/tests/CMakeLists.txt
@@ -7,6 +7,9 @@ add_executable(tcbmttest tcbmttest.c)
add_dependencies(tcbtest tchmgr)
add_dependencies(tcbmttest tchmgr tchmttest)
+set_target_properties(tcbtest tcbmttest PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
+
add_test(NAME tcbtest1 WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:tcbtest>
write casket 50000 5 5 5000 5 5)
diff --git a/tcejdb/src/tcbdb/tools/CMakeLists.txt b/tcejdb/src/tcbdb/tools/CMakeLists.txt
index 39642dc..10de211 100644
--- a/tcejdb/src/tcbdb/tools/CMakeLists.txt
+++ b/tcejdb/src/tcbdb/tools/CMakeLists.txt
@@ -1,6 +1,10 @@
link_libraries(ejdb_p)
add_executable(tcbmgr tcbmgr.c)
+set_target_properties(tcbmgr PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
+
+
install(TARGETS tcbmgr
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
diff --git a/tcejdb/src/tcfdb/tests/CMakeLists.txt b/tcejdb/src/tcfdb/tests/CMakeLists.txt
index 82f9665..3e7a139 100644
--- a/tcejdb/src/tcfdb/tests/CMakeLists.txt
+++ b/tcejdb/src/tcfdb/tests/CMakeLists.txt
@@ -4,10 +4,13 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TEST_DATA_DIR})
add_executable(tcftest tcftest.c)
add_executable(tcfmttest tcfmttest.c)
-
add_dependencies(tcftest tcfmgr)
add_dependencies(tcfmttest tcfmgr)
+set_target_properties(tcftest tcfmttest PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
+
+
add_test(NAME tcftest1 WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:tcftest>
write casket 50000 50)
diff --git a/tcejdb/src/tcfdb/tools/CMakeLists.txt b/tcejdb/src/tcfdb/tools/CMakeLists.txt
index a467c16..2ab76be 100644
--- a/tcejdb/src/tcfdb/tools/CMakeLists.txt
+++ b/tcejdb/src/tcfdb/tools/CMakeLists.txt
@@ -1,6 +1,9 @@
link_libraries(ejdb_p)
add_executable(tcfmgr tcfmgr.c)
+set_target_properties(tcfmgr PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
+
install(TARGETS tcfmgr
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
diff --git a/tcejdb/src/tchdb/tests/CMakeLists.txt b/tcejdb/src/tchdb/tests/CMakeLists.txt
index aaad448..d9f4c87 100644
--- a/tcejdb/src/tchdb/tests/CMakeLists.txt
+++ b/tcejdb/src/tchdb/tests/CMakeLists.txt
@@ -7,6 +7,9 @@ add_executable(tchmttest tchmttest.c)
add_dependencies(tchtest tchmgr)
add_dependencies(tchmttest tchmgr)
+set_target_properties(tchtest tchmttest PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
+
add_test(NAME tchtest1 WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:tchtest>
write casket 50000 5000 5 5)
diff --git a/tcejdb/src/tchdb/tools/CMakeLists.txt b/tcejdb/src/tchdb/tools/CMakeLists.txt
index a47f70f..bfaa086 100644
--- a/tcejdb/src/tchdb/tools/CMakeLists.txt
+++ b/tcejdb/src/tchdb/tools/CMakeLists.txt
@@ -1,5 +1,7 @@
link_libraries(ejdb_p)
add_executable(tchmgr tchmgr.c)
+set_target_properties(tchmgr PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
install(TARGETS tchmgr
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
diff --git a/tcejdb/src/tctdb/tests/CMakeLists.txt b/tcejdb/src/tctdb/tests/CMakeLists.txt
index 64b1112..76d0db2 100644
--- a/tcejdb/src/tctdb/tests/CMakeLists.txt
+++ b/tcejdb/src/tctdb/tests/CMakeLists.txt
@@ -7,6 +7,10 @@ add_executable(tctmttest tctmttest.c)
add_dependencies(tcttest tchmgr tcbmgr)
add_dependencies(tctmttest tchmgr tcbmgr)
+set_target_properties(tcttest tctmttest PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
+
+
add_test(NAME tcttest1 WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:tcttest>
write casket 50000 5000 5 5)
diff --git a/tcejdb/src/tctdb/tools/CMakeLists.txt b/tcejdb/src/tctdb/tools/CMakeLists.txt
index 1490e3b..0b55b93 100644
--- a/tcejdb/src/tctdb/tools/CMakeLists.txt
+++ b/tcejdb/src/tctdb/tools/CMakeLists.txt
@@ -1,5 +1,7 @@
link_libraries(ejdb_p)
add_executable(tctmgr tctmgr.c)
+set_target_properties(tctmgr PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
install(TARGETS tctmgr
FRAMEWORK DESTINATION ${FRAMEWORK_INSTALL_DIR}
diff --git a/tcejdb/src/tcutil/tests/CMakeLists.txt b/tcejdb/src/tcutil/tests/CMakeLists.txt
index 15408fc..6d5a64b 100644
--- a/tcejdb/src/tcutil/tests/CMakeLists.txt
+++ b/tcejdb/src/tcutil/tests/CMakeLists.txt
@@ -1,8 +1,13 @@
-link_libraries(ejdb)
+link_libraries(ejdb_p)
set(TEST_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TEST_DATA_DIR})
add_executable(tcutest tcutest.c)
+add_executable(tcumttest tcumttest.c)
+
+set_target_properties(tcutest tcumttest
+ PROPERTIES
+ COMPILE_FLAGS "-DEJDB_STATIC")
add_test(NAME tcutest1 WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:tcutest>
@@ -60,8 +65,6 @@ add_test(NAME tcutest14 WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:tcutest>
wicked 50000)
-add_executable(tcumttest tcumttest.c)
-
add_test(NAME tcumttest1 WORKING_DIRECTORY ${TEST_DATA_DIR}
COMMAND ${TEST_TOOL_CMD} $<TARGET_FILE:tcumttest>
combo 5 50000 500)
diff --git a/tcejdb/tcejdb.project b/tcejdb/tcejdb.project
index c4d433a..3833b52 100644
--- a/tcejdb/tcejdb.project
+++ b/tcejdb/tcejdb.project
@@ -2,7 +2,7 @@
<CodeLite_Project Name="tcejdb" InternalType="Console">
<Plugins>
<Plugin Name="qmake">
- <![CDATA[00010001N0011Debug_Linux000000000000]]>
+ <![CDATA[00030001N0011Debug_Linux0000000000000001N0007nix-dbg0000000000000001N0009win64-dbg000000000000]]>
</Plugin>
<Plugin Name="CMakePlugin">
<![CDATA[[{
@@ -14,6 +14,24 @@
"buildType": "",
"arguments": [],
"parentProject": ""
+ }, {
+ "name": "nix-dbg",
+ "enabled": true,
+ "buildDirectory": "build-nix-dbg",
+ "sourceDirectory": "$(ProjectPath)",
+ "generator": "Unix Makefiles",
+ "buildType": "Debug",
+ "arguments": ["-DBUILD_TESTS=ON ", "-DCMAKE_BUILD_TYPE=Debug", ""],
+ "parentProject": ""
+ }, {
+ "name": "win64-dbg",
+ "enabled": true,
+ "buildDirectory": "build-win64-dbg",
+ "sourceDirectory": "$(ProjectPath)",
+ "generator": "Unix Makefiles",
+ "buildType": "Debug",
+ "arguments": ["-DCMAKE_TOOLCHAIN_FILE=\"../tcejdb/win64-tc.cmake\"", "-DBUILD_TESTS=ON ", "-DCMAKE_BUILD_TYPE=Debug", "", ""],
+ "parentProject": ""
}]]]>
</Plugin>
</Plugins>
@@ -139,6 +157,16 @@
</VirtualDirectory>
<File Name="src/libejdb.pc.in"/>
</VirtualDirectory>
+ <VirtualDirectory Name="cmake">
+ <File Name="cmake/Modules/FindLzo.cmake"/>
+ <File Name="cmake/Modules/FindCUnit.cmake"/>
+ <File Name="CMakeLists.txt"/>
+ <File Name="CTestConfig.cmake"/>
+ <File Name="ctest.cmake"/>
+ <File Name="cmake/Modules/EjdbUtils.cmake"/>
+ <File Name="win64-tc.cmake"/>
+ <File Name="cmake/Modules/EjdbDebCpack.cmake"/>
+ </VirtualDirectory>
<Settings Type="Executable">
<GlobalSettings>
<Compiler Options="" C_Options="" Assembler="">
@@ -149,91 +177,16 @@
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
- <Configuration Name="Debug_Linux" CompilerType="clang( based on LLVM 3.4 )" DebuggerType="LLDB Debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-g;-O0;-Wall" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
- <IncludePath Value="."/>
- </Compiler>
- <Linker Options="" Required="yes"/>
- <ResourceCompiler Options="" Required="no"/>
- <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./build-debug/HelloWorld" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
- <Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
- <![CDATA[]]>
- </Environment>
- <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="no">
- <DebuggerSearchPaths/>
- <PostConnectCommands/>
- <StartupCommands/>
- </Debugger>
- <PreBuild/>
- <PostBuild/>
- <CustomBuild Enabled="yes">
- <Target Name="cmake">cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1</Target>
- <RebuildCommand>make clean &amp;&amp; mingw32-make -j4</RebuildCommand>
- <CleanCommand>make clean</CleanCommand>
- <BuildCommand>make -j4</BuildCommand>
- <PreprocessFileCommand/>
- <SingleFileCommand/>
- <MakefileGenerationCommand/>
- <ThirdPartyToolName>None</ThirdPartyToolName>
- <WorkingDirectory>$(WorkspacePath)/build-debug</WorkingDirectory>
- </CustomBuild>
- <AdditionalRules>
- <CustomPostBuild/>
- <CustomPreBuild/>
- </AdditionalRules>
- <Completion EnableCpp11="no">
- <ClangCmpFlagsC/>
- <ClangCmpFlags/>
- <ClangPP/>
- <SearchPaths/>
- </Completion>
- </Configuration>
- <Configuration Name="Debug_Windows" CompilerType="clang( based on LLVM 3.4 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-g;-O0;-Wall" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
+ <Configuration Name="nix-dbg" CompilerType="GCC" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g -Wall" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
</Compiler>
- <Linker Options="" Required="yes"/>
- <ResourceCompiler Options="" Required="no"/>
- <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Debug" Command="./build-debug/HelloWorld" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
- <Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
- <![CDATA[]]>
- </Environment>
- <Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="" IsExtended="no">
- <DebuggerSearchPaths/>
- <PostConnectCommands/>
- <StartupCommands/>
- </Debugger>
- <PreBuild/>
- <PostBuild/>
- <CustomBuild Enabled="yes">
- <Target Name="cmake">cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1</Target>
- <RebuildCommand>mingw32-make clean &amp;&amp; mingw32-make -j4</RebuildCommand>
- <CleanCommand>mingw32-make clean</CleanCommand>
- <BuildCommand>mingw32-make -j4</BuildCommand>
- <PreprocessFileCommand/>
- <SingleFileCommand/>
- <MakefileGenerationCommand/>
- <ThirdPartyToolName>None</ThirdPartyToolName>
- <WorkingDirectory>$(WorkspacePath)/build-debug</WorkingDirectory>
- </CustomBuild>
- <AdditionalRules>
- <CustomPostBuild/>
- <CustomPreBuild/>
- </AdditionalRules>
- <Completion EnableCpp11="no">
- <ClangCmpFlagsC/>
- <ClangCmpFlags/>
- <ClangPP/>
- <SearchPaths/>
- </Completion>
- </Configuration>
- <Configuration Name="Release_Linux" CompilerType="clang( based on LLVM 3.4 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-g;-O0;-Wall" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
- <IncludePath Value="."/>
- </Compiler>
- <Linker Options="" Required="yes"/>
+ <Linker Options="-O0" Required="yes">
+ <LibraryPath Value="."/>
+ <LibraryPath Value="Debug"/>
+ </Linker>
<ResourceCompiler Options="" Required="no"/>
- <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./build-release/HelloWorld" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
+ <General OutputFile="" IntermediateDirectory="./Debug" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="./Debug" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
@@ -244,16 +197,15 @@
</Debugger>
<PreBuild/>
<PostBuild/>
- <CustomBuild Enabled="yes">
- <Target Name="cmake">cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1</Target>
- <RebuildCommand>make clean &amp;&amp; make -j4</RebuildCommand>
- <CleanCommand>make clean</CleanCommand>
- <BuildCommand>make -j4</BuildCommand>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
- <ThirdPartyToolName>None</ThirdPartyToolName>
- <WorkingDirectory>$(WorkspacePath)/build-release</WorkingDirectory>
+ <ThirdPartyToolName/>
+ <WorkingDirectory/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
@@ -266,13 +218,16 @@
<SearchPaths/>
</Completion>
</Configuration>
- <Configuration Name="Release_Windows" CompilerType="clang( based on LLVM 3.4 )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
- <Compiler Options="-g;-O0;-Wall" C_Options="-g;-O0;-Wall" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
+ <Configuration Name="win64-dbg" CompilerType="Cross GCC ( x86_64-linux-gnu )" DebuggerType="GNU gdb debugger" Type="Executable" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
+ <Compiler Options="-g -Wall" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" PCHFlags="" PCHFlagsPolicy="0">
<IncludePath Value="."/>
</Compiler>
- <Linker Options="" Required="yes"/>
+ <Linker Options="-O0" Required="yes">
+ <LibraryPath Value="."/>
+ <LibraryPath Value="Debug"/>
+ </Linker>
<ResourceCompiler Options="" Required="no"/>
- <General OutputFile="$(IntermediateDirectory)/$(ProjectName)" IntermediateDirectory="./Release" Command="./build-release/HelloWorld" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
+ <General OutputFile="" IntermediateDirectory="./Debug" Command="/home/adam/Projects/softmotions/ejdb/build-win64-dbg/src/ejdb/tests/ejdbtest2.exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="./Debug" PauseExecWhenProcTerminates="yes" IsGUIProgram="no" IsEnabled="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
@@ -283,16 +238,15 @@
</Debugger>
<PreBuild/>
<PostBuild/>
- <CustomBuild Enabled="yes">
- <Target Name="cmake">cmake .. -G "MinGW Makefiles" -DCMAKE_EXPORT_COMPILE_COMMANDS=1</Target>
- <RebuildCommand>mingw32-make clean &amp;&amp; mingw32-make -j4</RebuildCommand>
- <CleanCommand>mingw32-make clean</CleanCommand>
- <BuildCommand>mingw32-make -j4</BuildCommand>
+ <CustomBuild Enabled="no">
+ <RebuildCommand/>
+ <CleanCommand/>
+ <BuildCommand/>
<PreprocessFileCommand/>
<SingleFileCommand/>
<MakefileGenerationCommand/>
- <ThirdPartyToolName>None</ThirdPartyToolName>
- <WorkingDirectory>$(WorkspacePath)/build-release</WorkingDirectory>
+ <ThirdPartyToolName/>
+ <WorkingDirectory/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild/>
@@ -306,12 +260,4 @@
</Completion>
</Configuration>
</Settings>
- <VirtualDirectory Name="cmake">
- <File Name="cmake/Modules/FindLzo.cmake"/>
- <File Name="cmake/Modules/FindCUnit.cmake"/>
- <File Name="CMakeLists.txt"/>
- <File Name="CTestConfig.cmake"/>
- <File Name="ctest.cmake"/>
- <File Name="cmake/Modules/EjdbUtils.cmake"/>
- </VirtualDirectory>
</CodeLite_Project>
diff --git a/tcejdb/win64-tc.cmake b/tcejdb/win64-tc.cmake
new file mode 100644
index 0000000..93abd5d
--- /dev/null
+++ b/tcejdb/win64-tc.cmake
@@ -0,0 +1,22 @@
+if (NOT MXE_HOME)
+ set(MXE_HOME /home/adam/Projects/mxe)
+endif()
+if (NOT MXE_CFG)
+ set(MXE_CFG "x86_64-w64-mingw32.static")
+endif()
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(MSYS 1)
+set(CMAKE_FIND_ROOT_PATH ${MXE_HOME}/usr/${MXE_CFG})
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_C_COMPILER ${MXE_HOME}/usr/bin/${MXE_CFG}-gcc)
+set(CMAKE_CXX_COMPILER ${MXE_HOME}/usr/bin/${MXE_CFG}-g++)
+set(CMAKE_Fortran_COMPILER ${MXE_HOME}/usr/bin/${MXE_CFG}-gfortran)
+set(CMAKE_RC_COMPILER ${MXE_HOME}/usr/bin/${MXE_CFG}-windres)
+set(CMAKE_MODULE_PATH "${MXE_HOME}/src/cmake" ${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts
+#set(CMAKE_INSTALL_PREFIX ${MXE_HOME}/usr/x86_64-w64-mingw32.static CACHE PATH "Installation Prefix")
+set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075
+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>") # Workaround for buggy windres rules
+set(PKG_CONFIG_EXECUTABLE ${MXE_HOME}/usr/bin/${MXE_CFG}-pkg-config)