Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,33 @@ matrix:
addons: &gcc6
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'gcc', 'g++', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-dev', 'libboost-regex-dev', 'ccache']
packages: ['g++-6', 'libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-dev', 'libboost-regex-dev', 'ccache']
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Debug'

- os: linux
compiler: "clang-3.8-debug"
addons: &clang38
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'gcc', 'g++', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-dev', 'libboost-regex-dev', 'ccache']
env: CLANG_VERSION='3.8.0' BUILD_TYPE='Debug' #RUN_CLANG_FORMAT=ON
# - os: linux
# compiler: "clang-3.9-debug"
# addons: &clang38
# apt:
# sources: ['ubuntu-toolchain-r-test']
# packages: ['libstdc++-4.9-dev', 'clang-3.9', 'libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-3.9-dev', 'libclang1-3.9', 'libboost-regex-dev', 'ccache']
# env: CCOMPILER='clang' CXXCOMPILER='clang++' CLANG_VERSION='3.9.0' BUILD_TYPE='Debug'

# Release Builds
- os: linux
compiler: "gcc-6-release"
addons: &gcc6
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'gcc', 'g++', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-dev', 'libboost-regex-dev', 'ccache']
packages: ['g++-6', 'libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-dev', 'libboost-regex-dev', 'ccache']
env: CCOMPILER='gcc-6' CXXCOMPILER='g++-6' BUILD_TYPE='Release'

- os: linux
compiler: "clang-3.8-release"
addons: &clang38
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'gcc', 'g++', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-dev', 'libboost-regex-dev', 'ccache']
env: CLANG_VERSION='3.8.0' BUILD_TYPE='Release' #RUN_CLANG_FORMAT=ON
# - os: linux
# compiler: "clang-3.9-release"
# addons: &clang38
# apt:
# sources: ['ubuntu-toolchain-r-test']
# packages: ['libstdc++-4.9-dev', 'clang-3.9', 'libglib2.0-dev', 'qt4-qmake', 'libqt4-dev', 'libantlr3c-dev', 'libboost-system-dev', 'libboost-filesystem-dev', 'libboost-program-options-dev', 'libboost-regex-dev', 'libboost-python-dev', 'python3-dev', 'python3', 'make', 'cmake', 'antlr', 'antlr3', 'libhiredis-dev', 'qtbase5-dev', 'llvm', 'libcurl4-openssl-dev', 'libclang-3.9-dev', 'libclang1-3.9', 'libboost-regex-dev', 'ccache']
# env: CCOMPILER='clang' CXXCOMPILER='clang++' CLANG_VERSION='3.9.0' BUILD_TYPE='Release'

before_install:
- if [[ $(uname -s) == 'Darwin' ]]; then sudo mdutil -i off /; fi;
Expand All @@ -80,7 +80,7 @@ install:
- mkdir build && pushd build
- export CC=${CCOMPILER} CXX=${CXXCOMPILER}
- cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DENABLE_CCACHE=ON -DSC_AUTO_TEST=ON -DSC_KPM_SCP=OFF
- echo "travis_fold:start:MAKE"
- echo "travis_fold:start:MAKE"\
- make --jobs=${JOBS}
- echo "travis_fold:end:MAKE"
- ccache -s
Expand Down
32 changes: 15 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,25 @@ endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )

set(SC_MEMORY_SRC "${SC_MACHINE_ROOT}/sc-memory")

if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics -std=c++14")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")

if(${SC_AUTO_TEST})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdeprecated-declarations")
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "-O3") ## Optimize
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s") ## Strip binary
endif()

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSC_DEBUG -DSC_PROFILE")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSC_DEBUG -DSC_PROFILE")

set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")

if (${SC_AUTO_TEST})
add_definitions(-DSC_BUILD_AUTO_TESTS)
endif()
Expand Down Expand Up @@ -83,16 +93,16 @@ if (${UNIX})
endif ()

pkg_check_modules(LIBCURL REQUIRED libcurl)

message (${LIBCLANG_LIBRARIES})

include_directories("${SC_MACHINE_THIRDPARTY_PATH}"
"${SC_MACHINE_ANTRL_DIR}/cpp")

add_definitions(-DSC_PLATFORM_UNIX)

# for std::thread support
if (${CMAKE_COMPILER_IS_GNUCXX})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")

elseif (${WIN32})
find_package(PythonLibs 3.6 REQUIRED)
Expand Down Expand Up @@ -202,16 +212,4 @@ add_subdirectory(${SC_MACHINE_ROOT}/sc-kpm)
add_subdirectory(${SC_MACHINE_ROOT}/sc-network)
add_subdirectory(${SC_MACHINE_ROOT}/tools)

if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
if(MSVC)
message(STATUS "Compiler: MSVC, version: " ${MSVC_VERSION})
endif(MSVC)
if(BORLAND)
message(STATUS "Compiler: BCC")
endif(BORLAND)
else(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
message(STATUS "Only GCC is supported on Linux")
endif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)

message(STATUS "CMake generates " ${CMAKE_GENERATOR})

4 changes: 4 additions & 0 deletions doc_pakages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pygments
markdown-include
mkdocs-cinder
pymdown-extensions
1 change: 1 addition & 0 deletions docs/_assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

.scg content span {
line-height: 1 !important;
font-size: 11px !important;
}

.invalid {
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Fix python threading
- Fix problem with twicely pass of edge in template search
- Fix problem with stack overflow on large template search
- Fix some python wrapping functions
- Improve `ScType` class
- Add types support in SCs-parser
- Add keynode cache
Expand All @@ -21,12 +22,15 @@
- Add `ScAgent` class
- Improve custom main cycle in `ScModule`
- Improve python testing
- Implement `ScHelper` class

- **Tools**:
- Fix error handling in sc-builder
- Fix `show-filenames` parameter processing in sc-builder

- **Common**
- Update documentation theme
- Improve python library documentation

## v0.4.1

Expand Down
20 changes: 20 additions & 0 deletions docs/images/python/sc_helper_kbReplaceBinaryRelation_1.gwf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<GWF version="2.0">
<staticSector>
<node type="node/var/general_node" idtf="_relAddr" shapeColor="0" id="2565026121792" parent="0" left="0" top="0" right="121" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-525" y="0" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<node type="node/-/not_define" idtf="_x" shapeColor="0" id="2565026124288" parent="0" left="0" top="0" right="40" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-435" y="75" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<node type="node/var/general_node" idtf="_addr" shapeColor="0" id="2565026122832" parent="0" left="0" top="0" right="84" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-585" y="75" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<arc type="arc/var/pos" idtf="" shapeColor="0" id="2565023115136" parent="0" id_b="2565026121792" id_e="2565022119600" b_x="-525" b_y="0" e_x="0" e_y="0" dotBBalance="0" dotEBalance="0.385496">
<points/>
</arc>
<pair type="pair/var/orient" idtf="" shapeColor="0" id="2565022119600" parent="0" id_b="2565026122832" id_e="2565026124288" b_x="-585" b_y="75" e_x="-435" e_y="75" dotBBalance="0" dotEBalance="0">
<points/>
</pair>
</staticSector>
</GWF>
20 changes: 20 additions & 0 deletions docs/images/python/sc_helper_kbReplaceBinaryRelation_2.gwf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<GWF version="2.0">
<staticSector>
<node type="node/var/not_define" idtf="_newTarget" shapeColor="193" id="2565026124288" parent="0" left="0" top="0" right="158" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-435" y="75" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<node type="node/var/general_node" idtf="_addr" shapeColor="0" id="2565026122832" parent="0" left="0" top="0" right="84" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-585" y="75" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<node type="node/var/general_node" idtf="_relAddr" shapeColor="0" id="2565026121792" parent="0" left="0" top="0" right="121" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-525" y="0" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<arc type="arc/var/pos" idtf="" shapeColor="0" id="2565023115136" parent="0" id_b="2565026121792" id_e="2565022119600" b_x="-525" b_y="0" e_x="0" e_y="0" dotBBalance="0" dotEBalance="0.385496">
<points/>
</arc>
<pair type="pair/var/orient" idtf="" shapeColor="0" id="2565022119600" parent="0" id_b="2565026122832" id_e="2565026124288" b_x="-585" b_y="75" e_x="-435" e_y="75" dotBBalance="0" dotEBalance="0">
<points/>
</pair>
</staticSector>
</GWF>
20 changes: 20 additions & 0 deletions docs/images/python/sc_helper_kbSetRelationLinkValue.gwf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<GWF version="2.0">
<staticSector>
<node type="node/var/general_node" idtf="_addr" shapeColor="193" id="2565022963872" parent="0" left="0" top="0" right="84" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-645" y="-45" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<node type="node/var/general_node" idtf="" shapeColor="0" id="2565022964496" parent="0" x="-465" y="-45" haveBus="false" idtf_pos="0">
<content type="1" mime_type="content/term" content_visibility="true" file_name=""><![CDATA[_value]]></content>
</node>
<node type="node/var/general_node" idtf="_relAddr" shapeColor="0" id="2565022969488" parent="0" left="0" top="0" right="121" bottom="41" textColor="164" text_angle="0" text_font="Times New Roman [Arial]" font_size="10" x="-585" y="-135" haveBus="false" idtf_pos="0">
<content type="0" mime_type="" content_visibility="false" file_name=""/>
</node>
<pair type="pair/var/orient" idtf="" shapeColor="0" id="2565023113936" parent="0" id_b="2565022963872" id_e="2565022964496" b_x="-645" b_y="-45" e_x="-465" e_y="-45" dotBBalance="0" dotEBalance="0">
<points/>
</pair>
<arc type="arc/var/pos" idtf="" shapeColor="0" id="2565023113696" parent="0" id_b="2565022969488" id_e="2565023113936" b_x="-585" b_y="-135" e_x="-2" e_y="0" dotBBalance="0" dotEBalance="0.378277">
<points/>
</arc>
</staticSector>
</GWF>
Loading