-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
286 additions
and
18 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
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
10 changes: 5 additions & 5 deletions
10
test_cases/standard/test.sh → test_cases/header.include
100755 → 100644
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,12 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# Header | ||
set -e | ||
echo | ||
echo "--- Starting test ------" | ||
echo "file: $0" | ||
echo "directory: $PWD" | ||
echo "configure.pyz: $CONFIGURE_PYZ" | ||
echo -n "version: " | ||
$CONFIGURE_PYZ --version | ||
echo -n "time-stamp: " | ||
date -R | ||
echo "------------------------" | ||
|
||
echo "Nothing to do here, not yet implemented" | ||
set -v |
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,20 @@ | ||
#!/bin/bash | ||
source ../header.include | ||
|
||
$CONFIGURE_PYZ -f tools/configure.json --makefile | ||
|
||
make embed | ||
make debug | ||
./build/bin_debug/myexe | ||
|
||
make release | ||
./bin/myexe | ||
|
||
make targets | ||
make sublime | ||
make codeblocks | ||
make doxygen | ||
|
||
rm -Rf bin build projects | ||
rm -f build.ninja Makefile | ||
find . -regex '.*EmbeddedData\.\(h\|cpp\)' -delete |
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,5 @@ | ||
#include <mylib/mylib.h> | ||
|
||
int main() { | ||
mylib::do_the_test(); | ||
} |
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,13 @@ | ||
{ | ||
"targets": [ | ||
{ | ||
"target_name": "myexe", | ||
"type": "executable", | ||
"dependencies": | ||
[ | ||
"mylib.a", | ||
"mylib_dependency.a" | ||
] | ||
} | ||
] | ||
} |
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,11 @@ | ||
#include "mylib.h" | ||
|
||
#include <mylib_dependency/mylib_dependency.h> | ||
|
||
namespace mylib { | ||
|
||
void do_the_test() { | ||
mylib_dependency::do_the_test(); | ||
} | ||
|
||
} |
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 | ||
|
||
namespace mylib { | ||
|
||
void do_the_test(); | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
test_cases/standard/source/mylib_dependency/mylib_dependency.cpp
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,17 @@ | ||
#include "mylib_dependency.h" | ||
|
||
#include "EmbeddedData.h" | ||
|
||
#include <iostream> | ||
#include <string> | ||
|
||
namespace mylib_dependency { | ||
|
||
void do_the_test() { | ||
std::string str{ | ||
mylib_dependency_resources_data_txt, | ||
mylib_dependency_resources_data_txt + mylib_dependency_resources_data_txt_len}; | ||
std::cout << str; | ||
} | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
test_cases/standard/source/mylib_dependency/mylib_dependency.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,7 @@ | ||
#pragma once | ||
|
||
namespace mylib_dependency { | ||
|
||
void do_the_test(); | ||
|
||
} |
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 @@ | ||
success! |
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,8 @@ | ||
{ | ||
"targets": [ | ||
{ | ||
"type": "static_library", | ||
"embedded_data": ["resources/*"] | ||
} | ||
] | ||
} |
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,38 @@ | ||
PROJECT_NAME = $project_name | ||
OUTPUT_DIRECTORY = $builddir/doxygen | ||
CREATE_SUBDIRS = YES | ||
FULL_PATH_NAMES = NO | ||
JAVADOC_AUTOBRIEF = YES | ||
LOOKUP_CACHE_SIZE = 3 | ||
EXTRACT_ALL = YES | ||
EXTRACT_PRIVATE = YES | ||
EXTRACT_STATIC = YES | ||
CASE_SENSE_NAMES = YES | ||
SORT_BRIEF_DOCS = YES | ||
WARN_IF_UNDOCUMENTED = NO | ||
WARN_LOGFILE = $builddir/doxygen/warnings.log | ||
INPUT = $sourcedir | ||
FILE_PATTERNS = *.cpp *.cc *.h *.hpp | ||
RECURSIVE = YES | ||
SOURCE_BROWSER = YES | ||
STRIP_CODE_COMMENTS = NO | ||
REFERENCED_BY_RELATION = YES | ||
REFERENCES_RELATION = YES | ||
ALPHABETICAL_INDEX = NO | ||
HTML_DYNAMIC_SECTIONS = YES | ||
DISABLE_INDEX = YES | ||
GENERATE_TREEVIEW = YES | ||
FORMULA_FONTSIZE = 12 | ||
GENERATE_LATEX = NO | ||
MACRO_EXPANSION = YES | ||
EXPAND_ONLY_PREDEF = YES | ||
INCLUDE_PATH = $sourcedir | ||
INCLUDE_FILE_PATTERNS = *.h *.hpp | ||
HIDE_UNDOC_RELATIONS = NO | ||
HAVE_DOT = YES | ||
TEMPLATE_RELATIONS = YES | ||
CALL_GRAPH = YES | ||
CALLER_GRAPH = YES | ||
DOT_IMAGE_FORMAT = svg | ||
INTERACTIVE_SVG = YES | ||
DOT_MULTI_TARGETS = YES |
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,101 @@ | ||
{ | ||
// Settings file for configure.py. | ||
// | ||
// Note: relative paths are searched from the directory from within | ||
// configure.py is called. | ||
// | ||
// $rootpath is also available in this file, it expands to the full path of | ||
// the calling directory. | ||
|
||
"variables": { | ||
"project_name": "Standard Test", | ||
"builddir": "build", | ||
"sourcedir": "source", | ||
"projectsdir": "projects", | ||
"doxyfile": "tools/Doxyfile", | ||
"shell": "sh -c" | ||
}, | ||
|
||
"compiler": { | ||
"cxx": "g++", | ||
"cflags": ["-Wall", "-std=c++14"], | ||
"lflags": ["-Wall", "-Wextra", "-pthread"], | ||
"includes": ["$sourcedir"], | ||
"defines": [] | ||
}, | ||
|
||
"configurations": [ | ||
{ | ||
"name": "release", | ||
|
||
"bin": "bin", | ||
"lib": "$builddir/lib_release", | ||
"obj": "$builddir/obj_release", | ||
|
||
"cflags": ["-O3"], | ||
"defines": ["NDEBUG"] | ||
}, | ||
{ | ||
"name": "debug", | ||
|
||
"bin": "$builddir/bin_debug", | ||
"lib": "$builddir/lib_debug", | ||
"obj": "$builddir/obj_debug", | ||
|
||
"cflags": ["-O0", "-g"], | ||
"defines": ["_DEBUG"] | ||
} | ||
], | ||
|
||
"target_defaults": { | ||
"type": "static_library", | ||
"dependencies": [], | ||
"defines": [], | ||
"include_dirs": [], | ||
"sources": ["*.cpp", "*.cc"], | ||
"headers": ["*.h", "*.hpp"], | ||
"embedded_data": [], | ||
"unused": [] | ||
}, | ||
|
||
// Filename of extra rules for targets under $sourcedir. The contents of these | ||
// files override "target_defaults". | ||
"target_rules_filename": "rules.json", | ||
|
||
"ninja_build_filename": "build.ninja", | ||
|
||
"makefile_filename": "Makefile", | ||
|
||
// Path to the file containing the Ninja rules. | ||
"ninja_rules_filepath": "tools/rules.ninja", | ||
|
||
// Default name for the target directly under $sourcedir. | ||
"root_target_name": "root", | ||
|
||
// Folders to be included in the Sublime Text project file. | ||
"sublime_project_folders": [ | ||
{ | ||
"path": ".", | ||
"folder_exclude_patterns": ["$builddir"] | ||
} | ||
], | ||
|
||
// Other settings to add to the Sublime Text project file. | ||
"sublime_project_other_settings": { | ||
"SublimeLinter": { | ||
"linters": { | ||
"clang": { | ||
"include_dirs": | ||
[ | ||
"$rootpath/$sourcedir", | ||
"$rootpath/$sourcedir/third-party" | ||
], | ||
"extra_flags": "-std=c++14" | ||
} | ||
} | ||
} | ||
}, | ||
|
||
// Compiler name used in CodeBlocks. | ||
"codeblocks_compiler_name": "gcc" | ||
} |
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,23 @@ | ||
rule cxx | ||
depfile = $out.d | ||
command = $cxx -MMD -MF $out.d $cflags -c $in -o $out | ||
description = CC $out | ||
|
||
rule ar | ||
command = ar crsT $out $in | ||
description = AR $out | ||
|
||
rule link | ||
command = $cxx $lflags -o $out $libs | ||
description = LINK $out | ||
|
||
rule doxygen | ||
command = doxygen $in | ||
description = Doxygen Documentation | ||
|
||
rule sed | ||
command = $shell "sed $ | ||
-e 's/\$$project_name/\"$project_name\"/' $ | ||
-e 's/\$$sourcedir/$sourcedir/' $ | ||
-e 's/\$$builddir/$builddir/' $in > $out" | ||
description = SED $out |