-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated export autocommit from mamba.ru
- Loading branch information
GitLab Runner
committed
Dec 6, 2023
1 parent
029830b
commit 568e249
Showing
17 changed files
with
276 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
*_build.counter | ||
*build_info.h | ||
*~ | ||
*.kdev4 | ||
*.pyc | ||
.cproject | ||
.project | ||
*.o | ||
*/debug | ||
*/release | ||
*/build | ||
build | ||
.tup | ||
*.kch | ||
autom4te.cache | ||
*.deps | ||
CMakeFiles | ||
CMakeCache.txt | ||
*.kate-swp | ||
*build_info.h | ||
config.h | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(wjson) | ||
project(wjson VERSION "0.9.8") | ||
|
||
include(cmake/ci.cmake) | ||
|
||
wci_submodule(NAME faslib) | ||
|
||
add_library(wjson INTERFACE) | ||
|
||
target_include_directories(wjson INTERFACE ${wjson_SOURCE_DIR}) | ||
target_include_directories(wjson INTERFACE $<BUILD_INTERFACE:${wjson_SOURCE_DIR}>) | ||
|
||
target_link_libraries(wjson INTERFACE faslib) | ||
|
||
|
@@ -20,29 +20,4 @@ if ( BUILD_TESTING OR CODE_COVERAGE) | |
endif() | ||
endif() | ||
|
||
set(CPACK_PACKAGE_NAME "wjson") | ||
set(CPACK_PACKAGE_VERSION_MAJOR "0") | ||
set(CPACK_PACKAGE_VERSION_MINOR "9") | ||
set(CPACK_PACKAGE_VERSION_PATCH "4") | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/Readme.md") | ||
set(CPACK_PACKAGE_CONTACT "[email protected]") | ||
|
||
install(DIRECTORY wjson DESTINATION include | ||
PATTERN "*.cmake" EXCLUDE | ||
PATTERN "*~" EXCLUDE | ||
PATTERN ".*" EXCLUDE | ||
PATTERN "Makefile" EXCLUDE | ||
PATTERN "CMakeFiles" EXCLUDE | ||
) | ||
|
||
install(DIRECTORY . DESTINATION share/wjson | ||
PATTERN "wjson" EXCLUDE | ||
PATTERN "*.cmake" EXCLUDE | ||
PATTERN "*~*" EXCLUDE | ||
PATTERN "*kdev*" EXCLUDE | ||
PATTERN ".git*" EXCLUDE | ||
PATTERN "Readme.md" EXCLUDE | ||
) | ||
|
||
include(CPack) | ||
include(cmake/install.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM debian | ||
ENV LANG ru_RU.UTF-8 | ||
ENV TZ="Europe/Moscow" | ||
RUN apt update | ||
RUN apt -y install g++ cmake git wget make | ||
COPY . /prj | ||
WORKDIR "/prj" | ||
RUN make release | ||
RUN make install | ||
RUN rm -rf /prj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
set(VERSION_MAJOR "${${PROJECT_NAME}_VERSION_MAJOR}") | ||
set(VERSION_MINOR "${${PROJECT_NAME}_VERSION_MINOR}") | ||
set(VERSION_PATCH "${${PROJECT_NAME}_VERSION_PATCH}") | ||
|
||
message(STATUS "${PROJECT_VERSION}: ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") | ||
|
||
if ( IS_DIRECTORY ${PROJECT_NAME} ) | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config/version.hpp.in" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/version.hpp" ) | ||
endif() | ||
|
||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config/version.yml.in" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/version.yml" ) | ||
|
||
|
||
include(GNUInstallDirs) | ||
include(CMakePackageConfigHelpers) | ||
|
||
set(package_config_destination ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) | ||
|
||
configure_package_config_file( | ||
${CMAKE_CURRENT_LIST_DIR}/../config/projectConfig.cmake.in ${PROJECT_NAME}Config.cmake | ||
INSTALL_DESTINATION ${package_config_destination} | ||
) | ||
write_basic_package_version_file( | ||
${PROJECT_NAME}ConfigVersion.cmake | ||
VERSION ${PROJECT_VERSION} | ||
COMPATIBILITY SameMajorVersion | ||
) | ||
|
||
install( | ||
EXPORT ${PROJECT_NAME}Targets | ||
DESTINATION ${package_config_destination} | ||
) | ||
|
||
install( | ||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake | ||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake | ||
DESTINATION ${package_config_destination} | ||
) | ||
|
||
install( | ||
TARGETS ${PROJECT_NAME} | ||
EXPORT ${PROJECT_NAME}Targets | ||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" | ||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
) | ||
|
||
if ( IS_DIRECTORY ${PROJECT_NAME} ) | ||
install( | ||
DIRECTORY ${PROJECT_NAME} | ||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" | ||
PATTERN *.hpp | ||
) | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
project(config) | ||
|
||
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake) | ||
INCLUDE (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) | ||
INCLUDE (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) | ||
|
||
CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_RT_LIB) | ||
CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME_FUNC) | ||
|
||
check_include_file("sys/time.h" HAVE_SYS_TIME_H) | ||
check_include_file("sys/resource.h" HAVE_SYS_RESORCE_H) | ||
check_include_file("sys/timeb.h" HAVE_SYS_TIMEB_H) | ||
|
||
check_include_file("unistd.h" HAVE_UNISTD_H) | ||
check_include_file("io.h" HAVE_IO_H) | ||
check_include_file("Windows.h" HAVE_WINDOWS_H) | ||
|
||
|
||
set( | ||
CMAKE_REQUIRED_INCLUDES | ||
${CMAKE_REQUIRED_INCLUDES} | ||
"sys/time.h" | ||
"sys/resource.h" | ||
"sys/timeb.h" | ||
"unistd.h" | ||
"io.h" | ||
"Windows.h" | ||
) | ||
|
||
check_function_exists("gettimeofday" HAVE_GETTIMEOFDAY_FUNC) | ||
check_function_exists("socket" HAVE_SOCKET_FUNC) | ||
check_function_exists("ftime" HAVE_FTIME_FUNC) | ||
check_function_exists("_ftime" HAVE__FTIME_FUNC) | ||
check_function_exists("_ftime32_s" HAVE__FTIME_S_FUNC) | ||
check_function_exists("_ftime64_s" HAVE__FTIME_S_FUNC) | ||
check_function_exists("isatty" HAVE_ISATTY_FUNC) | ||
check_function_exists("_isatty" HAVE__ISATTY_FUNC) | ||
check_function_exists("getrusage" HAVE_GETRUSAGE_FUNC) | ||
check_function_exists("usleep" HAVE_USLEEP_FUNC) | ||
check_function_exists("clock_gettime" HAVE_CLOCK_GETTIME_FUNC) | ||
|
||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/../config/config.h.in" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../fas/system/config.h" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// Author: Vladimir Migashko <[email protected]>, (C) 2012 | ||
// | ||
// Copyright: See COPYING file that comes with this distribution | ||
// | ||
|
||
#ifndef FAS_SYSTEM_CONFIG_HPP | ||
#define FAS_SYSTEM_CONFIG_HPP | ||
|
||
/* Define to 1 if you have the <sys/time.h> header file. */ | ||
#cmakedefine HAVE_SYS_TIME_H | ||
|
||
#cmakedefine HAVE_SYS_RESORCE_H | ||
#cmakedefine HAVE_UNISTD_H | ||
|
||
|
||
/* Define to 1 if you have the <sys/timeb.h> header file. */ | ||
#cmakedefine HAVE_SYS_TIMEB_H | ||
|
||
/* Define to 1 if you have the <windows.h> header file. */ | ||
#cmakedefine HAVE_WINDOWS_H | ||
|
||
/* Define to 1 if you have the <io.h> header file. */ | ||
#cmakedefine HAVE_IO_H | ||
|
||
/* Define to 1 if you have the `gettimeofday' function. */ | ||
#cmakedefine HAVE_GETTIMEOFDAY_FUNC | ||
|
||
/* Define to 1 if you have the `socket' function. */ | ||
#cmakedefine HAVE_SOCKET_FUNC | ||
|
||
/* Define to 1 if you have the `clock_gettime' function. */ | ||
#cmakedefine HAVE_CLOCK_GETTIME_FUNC | ||
#cmakedefine HAVE_FTIME_FUNC | ||
#cmakedefine HAVE__FTIME_FUNC | ||
#cmakedefine HAVE__FTIME_S_FUNC | ||
#cmakedefine HAVE_ISATTY_FUNC | ||
#cmakedefine HAVE__ISATTY_FUNC | ||
#cmakedefine HAVE_GETRUSAGE_FUNC | ||
#cmakedefine HAVE_USLEEP_FUNC | ||
#cmakedefine HAVE_RT_LIB | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@PACKAGE_INIT@ | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
|
||
check_required_components(@PROJECT_NAME@) | ||
|
||
add_library(fas::testing ALIAS fas_testing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#define PROJECT_NAME "@PROJECT_NAME@" | ||
#define VERSION_MAJOR "@VERSION_MAJOR@" | ||
#define VERSION_MINOR "@VERSION_MINOR@" | ||
#define VERSION_PATCH "@VERSION_PATCH@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
variables: | ||
RELEASE_TAG: "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@" | ||
RELEASE_BRANCH: "release-@VERSION_MAJOR@.@VERSION_MINOR@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#include <wjson/json.hpp> | ||
#include <wjson/strerror.hpp> | ||
#include <iostream> | ||
|
||
struct foo | ||
{ | ||
bool flag; | ||
int value; | ||
std::string string; | ||
foo(): flag(false), value(0) {} | ||
}; | ||
|
||
struct boo: foo | ||
{ | ||
foo f; | ||
std::vector<foo> fl; | ||
} | ||
|
||
struct foo_json | ||
{ | ||
JSON_NAME(flag) | ||
JSON_NAME(value) | ||
JSON_NAME(string) | ||
|
||
typedef wjson::object< | ||
foo, | ||
wjson::member_list< | ||
wjson::member<n_flag, foo,bool, &foo::flag>, | ||
wjson::member<n_value, foo,int, &foo::value>, | ||
wjson::member<n_string, foo,std::string, &foo::string> | ||
> | ||
> meta; | ||
|
||
typedef meta::target target; | ||
typedef meta::member_list member_list; | ||
typedef meta::serializer serializer; | ||
|
||
static const char* comment(n_flag) { return "Это флаг"; } | ||
}; | ||
|
||
int main() | ||
{ | ||
return 0; | ||
} |
Submodule faslib
updated
11 files
+22 −0 | .dockerignore | |
+1 −0 | .gitignore | |
+23 −30 | CMakeLists.txt | |
+10 −0 | Dockerfile | |
+18 −8 | Makefile | |
+58 −0 | cmake/install.cmake | |
+7 −0 | config/projectConfig.cmake.in | |
+7 −0 | config/version.hpp.in | |
+4 −0 | config/version.yml.in | |
+10 −0 | tutorial/algorithm/algorithm5.cpp | |
+4 −0 | version.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
variables: | ||
RELEASE_TAG: "0.9.8" | ||
RELEASE_BRANCH: "release-0.9" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
#include <fas/type_list.hpp> | ||
|
||
#include <string> | ||
#include <ctime> | ||
|
||
namespace wjson{ | ||
|
||
|
Oops, something went wrong.