Mxx_ru 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +26 -0
- data/NEWS +52 -0
- data/README +21 -0
- data/Rakefile +32 -0
- data/examples/exe_and_lib/main.cpp +15 -0
- data/examples/exe_and_lib/prj.rb +11 -0
- data/examples/exe_and_lib/say.cpp +13 -0
- data/examples/exe_and_lib/say.hpp +11 -0
- data/examples/exe_and_lib/say.rb +7 -0
- data/examples/exe_dll_lib/inout.cpp +15 -0
- data/examples/exe_dll_lib/inout.hpp +26 -0
- data/examples/exe_dll_lib/inout.rb +18 -0
- data/examples/exe_dll_lib/main.cpp +23 -0
- data/examples/exe_dll_lib/prj.rb +11 -0
- data/examples/exe_dll_lib/say.cpp +13 -0
- data/examples/exe_dll_lib/say.hpp +12 -0
- data/examples/exe_dll_lib/say.rb +9 -0
- data/examples/exe_dll_lib_2/build.rb +7 -0
- data/examples/exe_dll_lib_2/inout/inout.cpp +15 -0
- data/examples/exe_dll_lib_2/inout/inout.hpp +26 -0
- data/examples/exe_dll_lib_2/inout/prj.rb +16 -0
- data/examples/exe_dll_lib_2/main/main.cpp +23 -0
- data/examples/exe_dll_lib_2/main/prj.rb +9 -0
- data/examples/exe_dll_lib_2/say/prj.rb +8 -0
- data/examples/exe_dll_lib_2/say/say.cpp +13 -0
- data/examples/exe_dll_lib_2/say/say.hpp +12 -0
- data/examples/simple_exe/main.cpp +26 -0
- data/examples/simple_exe/prj.rb +7 -0
- data/lib/mxx_ru/abstract_target.rb +283 -0
- data/lib/mxx_ru/binary_target.rb +89 -0
- data/lib/mxx_ru/binary_unittest.rb +130 -0
- data/lib/mxx_ru/cpp/analyzer.rb +230 -0
- data/lib/mxx_ru/cpp/composite.rb +106 -0
- data/lib/mxx_ru/cpp/detect_toolset.rb +122 -0
- data/lib/mxx_ru/cpp/mode.rb +85 -0
- data/lib/mxx_ru/cpp/obj_placement.rb +321 -0
- data/lib/mxx_ru/cpp/qt.rb +333 -0
- data/lib/mxx_ru/cpp/rucodegen.rb +114 -0
- data/lib/mxx_ru/cpp/source_file.rb +71 -0
- data/lib/mxx_ru/cpp/target.rb +1371 -0
- data/lib/mxx_ru/cpp/toolset.rb +1029 -0
- data/lib/mxx_ru/cpp/toolsets/bcc_win32_5.rb +52 -0
- data/lib/mxx_ru/cpp/toolsets/bcc_win32_family.rb +451 -0
- data/lib/mxx_ru/cpp/toolsets/c89_etk_nsk.rb +56 -0
- data/lib/mxx_ru/cpp/toolsets/c89_nsk.rb +56 -0
- data/lib/mxx_ru/cpp/toolsets/c89_nsk_family.rb +273 -0
- data/lib/mxx_ru/cpp/toolsets/gcc_cygwin.rb +54 -0
- data/lib/mxx_ru/cpp/toolsets/gcc_family.rb +382 -0
- data/lib/mxx_ru/cpp/toolsets/gcc_linux.rb +60 -0
- data/lib/mxx_ru/cpp/toolsets/gcc_mingw.rb +144 -0
- data/lib/mxx_ru/cpp/toolsets/gcc_sparc_solaris.rb +87 -0
- data/lib/mxx_ru/cpp/toolsets/vc7.rb +62 -0
- data/lib/mxx_ru/cpp/toolsets/vc8.rb +452 -0
- data/lib/mxx_ru/cpp/toolsets/vc_family.rb +428 -0
- data/lib/mxx_ru/cpp.rb +36 -0
- data/lib/mxx_ru/ex.rb +134 -0
- data/lib/mxx_ru/makestyle_generator.rb +138 -0
- data/lib/mxx_ru/textfile_unittest.rb +284 -0
- data/lib/mxx_ru/util.rb +258 -0
- data/tests/c/pcre/chartables.c +183 -0
- data/tests/c/pcre/config.h +99 -0
- data/tests/c/pcre/dftables.c +167 -0
- data/tests/c/pcre/get.c +349 -0
- data/tests/c/pcre/internal.h +677 -0
- data/tests/c/pcre/maketables.c +140 -0
- data/tests/c/pcre/pcre.c +8304 -0
- data/tests/c/pcre/pcre.h +193 -0
- data/tests/c/pcre/pcre.rb +14 -0
- data/tests/c/pcre/pcredemo.c +316 -0
- data/tests/c/pcre/pcregrep.c +642 -0
- data/tests/c/pcre/pcreposix.c +305 -0
- data/tests/c/pcre/pcreposix.h +88 -0
- data/tests/c/pcre/pcretest.c +1483 -0
- data/tests/c/pcre/perltest +211 -0
- data/tests/c/pcre/printint.c +360 -0
- data/tests/c/pcre/study.c +472 -0
- data/tests/cpp/mswin_res_dll/build.rb +14 -0
- data/tests/cpp/mswin_res_dll/dll.cpp +17 -0
- data/tests/cpp/mswin_res_dll/dll.rb +30 -0
- data/tests/cpp/mswin_res_dll/dll.rc +48 -0
- data/tests/cpp/mswin_res_dll/h/dll.hpp +8 -0
- data/tests/cpp/mswin_res_dll/h/res.h +3 -0
- data/tests/cpp/mswin_res_dll/main.cpp +13 -0
- data/tests/cpp/mswin_res_dll/main.rb +20 -0
- data/tests/cpp/mswin_res_dll/res/tree_fol.bmp +0 -0
- data/tests/cpp/mswin_res_dll/res/tree_state_1.bmp +0 -0
- data/tests/cpp/mswin_res_dll/res/tree_state_2.bmp +0 -0
- data/tests/cpp/mswin_res_exe/build.rb +23 -0
- data/tests/cpp/mswin_res_exe/h/res.h +3 -0
- data/tests/cpp/mswin_res_exe/main.cpp +17 -0
- data/tests/cpp/mswin_res_exe/main.rc +48 -0
- data/tests/cpp/mswin_res_exe/res/tree_fol.bmp +0 -0
- data/tests/cpp/mswin_res_exe/res/tree_state_1.bmp +0 -0
- data/tests/cpp/mswin_res_exe/res/tree_state_2.bmp +0 -0
- data/tests/cpp/rucodegen/host_config.cpp +20 -0
- data/tests/cpp/rucodegen/host_config.rb +14 -0
- data/tests/cpp/rucodegen/impl/conn_params.cpp +7 -0
- data/tests/cpp/rucodegen/impl/conn_params.rb +14 -0
- data/tests/cpp/rucodegen/impl/h/conn_params.hpp +10 -0
- data/tests/cpp/rucodegen/prj.rb +17 -0
- data/tests/cpp/textfile_unittest/build.rb +8 -0
- data/tests/cpp/textfile_unittest/etalons/out_0.txt +0 -0
- data/tests/cpp/textfile_unittest/etalons/out_1.txt +1 -0
- data/tests/cpp/textfile_unittest/etalons/out_128.txt +128 -0
- data/tests/cpp/textfile_unittest/main.cpp +89 -0
- data/tests/cpp/textfile_unittest/prj.rb +8 -0
- data/tests/cpp/textfile_unittest/prj.ut.rb +18 -0
- data/tests/cpp/toolset_name.rb +6 -0
- data/tests/cpp/vc_cleanup/cout.log +72 -0
- data/tests/cpp/vc_cleanup/dll_hi.cpp +5 -0
- data/tests/cpp/vc_cleanup/exe_hi.cpp +10 -0
- data/tests/cpp/vc_cleanup/lib_hi.cpp +5 -0
- data/tests/cpp/vc_cleanup/prj_dll_no_implib.rb +10 -0
- data/tests/cpp/vc_cleanup/prj_dll_no_implib_simple_target_root.rb +11 -0
- data/tests/cpp/vc_cleanup/prj_dll_with_implib.rb +11 -0
- data/tests/cpp/vc_cleanup/prj_dll_with_implib_simple_target_root.rb +14 -0
- data/tests/cpp/vc_cleanup/prj_exe_no_implib.rb +10 -0
- data/tests/cpp/vc_cleanup/prj_exe_no_implib_simple_target_root.rb +11 -0
- data/tests/cpp/vc_cleanup/prj_lib.rb +10 -0
- data/tests/cpp/vc_cleanup/prj_lib_with_simple_target_root.rb +11 -0
- data/tests/cpp/vc_cleanup/tc_vc_cleanup.rb +60 -0
- data/tests/mxx_ru/change_default_value/ignoring_by_build_root/build.rb +8 -0
- data/tests/mxx_ru/change_default_value/ignoring_by_build_root/child_1.rb +5 -0
- data/tests/mxx_ru/change_default_value/ignoring_by_child_1/build.rb +7 -0
- data/tests/mxx_ru/change_default_value/ignoring_by_child_1/child_1.rb +5 -0
- data/tests/mxx_ru/change_default_value/ignoring_by_child_1/child_2.rb +5 -0
- data/tests/mxx_ru/change_default_value/ok/build.rb +8 -0
- data/tests/mxx_ru/change_default_value/ok/child_1.rb +8 -0
- data/tests/mxx_ru/tc_makestyle_generator.rb +117 -0
- data/tests/mxx_ru/vc8/tc_actual_manifest.rb +230 -0
- data/tests/mxx_ru/vc8/tc_append_mt_commands.rb +104 -0
- data/tests/mxx_ru/vc8/tc_default_manifest.rb +17 -0
- data/tests/mxx_ru/vc8/tc_define_manifest.rb +173 -0
- data/tests/mxx_ru/vc8/tc_drop_default_manifest.rb +16 -0
- data/tests/mxx_ru/vc8/tc_invalid_params.rb +81 -0
- data/tests/mxx_ru/vc8/ts_vc8.rb +10 -0
- data/tests/qt/aclock/aclock.cpp +148 -0
- data/tests/qt/aclock/aclock.h +45 -0
- data/tests/qt/aclock/main.cpp +28 -0
- data/tests/qt/aclock/prj.rb +21 -0
- data/tests/qt/iconview/main.cpp +76 -0
- data/tests/qt/iconview/prj.rb +21 -0
- data/tests/qt/toplevel/main.cpp +9 -0
- data/tests/qt/toplevel/options.ui +587 -0
- data/tests/qt/toplevel/options.ui.h +98 -0
- data/tests/qt/toplevel/prj.rb +21 -0
- metadata +241 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
#include <windows.h>
|
2
|
+
|
3
|
+
#include <res.h>
|
4
|
+
|
5
|
+
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
|
6
|
+
#ifdef _WIN32
|
7
|
+
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
8
|
+
#pragma code_page(1251)
|
9
|
+
#endif //_WIN32
|
10
|
+
#endif
|
11
|
+
|
12
|
+
IDB_TREE_STATE_NORMAL BITMAP MOVEABLE PURE "res\\tree_state_1.bmp"
|
13
|
+
IDB_TREE_STATE_MASK BITMAP MOVEABLE PURE "res\\tree_state_2.bmp"
|
14
|
+
IDB_TREE_FOLDER BITMAP MOVEABLE PURE "res\\tree_fol.bmp"
|
15
|
+
|
16
|
+
VS_VERSION_INFO VERSIONINFO
|
17
|
+
FILEVERSION 1,0,0,0
|
18
|
+
PRODUCTVERSION 1,0,0,0
|
19
|
+
FILEFLAGSMASK 0x3fL
|
20
|
+
#ifdef _DEBUG
|
21
|
+
FILEFLAGS 0x1L
|
22
|
+
#else
|
23
|
+
FILEFLAGS 0x0L
|
24
|
+
#endif
|
25
|
+
FILEOS 0x4L
|
26
|
+
FILETYPE 0x1L
|
27
|
+
FILESUBTYPE 0x0L
|
28
|
+
BEGIN
|
29
|
+
BLOCK "StringFileInfo"
|
30
|
+
BEGIN
|
31
|
+
BLOCK "040904b0"
|
32
|
+
BEGIN
|
33
|
+
VALUE "CompanyName", "org.eao197\0"
|
34
|
+
VALUE "FileDescription", "Mxx_ru mswin_res_exe test\0"
|
35
|
+
VALUE "FileVersion", "1, 0, 0, 0\0"
|
36
|
+
VALUE "InternalName", "mswin_res_exe\0"
|
37
|
+
VALUE "LegalCopyright", "Copyright (C) 2004 Yauheni A. Akhotnikau\0"
|
38
|
+
VALUE "LegalTrademarks", "Mxx_ru (R)\0"
|
39
|
+
VALUE "OriginalFilename", "mswin_res_exe.exe\0"
|
40
|
+
VALUE "ProductName", "Mxx_ru\0"
|
41
|
+
VALUE "ProductVersion", "1, 0, 0, 0\0"
|
42
|
+
END
|
43
|
+
END
|
44
|
+
BLOCK "VarFileInfo"
|
45
|
+
BEGIN
|
46
|
+
VALUE "Translation", 0x409, 1200
|
47
|
+
END
|
48
|
+
END
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#include <string>
|
2
|
+
|
3
|
+
#include "impl/h/conn_params.hpp"
|
4
|
+
|
5
|
+
#include "h/host_config.impl.hpp"
|
6
|
+
#include "host_config.impl.cpp"
|
7
|
+
|
8
|
+
int
|
9
|
+
main()
|
10
|
+
{
|
11
|
+
impl::conn_params_t params;
|
12
|
+
params.attempts( 8 );
|
13
|
+
|
14
|
+
host_config_t cfg;
|
15
|
+
|
16
|
+
cfg.host( "eao197.narod.ru" );
|
17
|
+
cfg.port( 80 );
|
18
|
+
cfg.conn_params( params );
|
19
|
+
}
|
20
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require_gem 'RuCodeGen'
|
3
|
+
|
4
|
+
cpp_value_incapsulator :host_config_t do |c|
|
5
|
+
c.decl_file :script_relative => "h/host_config.impl.hpp"
|
6
|
+
c.impl_file :script_relative => "host_config.impl.cpp"
|
7
|
+
|
8
|
+
c.attr_suffix "_"
|
9
|
+
|
10
|
+
c.attr :host, "std::string", :default => "localhost"
|
11
|
+
c.attr :port, "short", :default => 8080
|
12
|
+
c.attr :conn_params, "impl::conn_params_t", :getter_returns_value => true
|
13
|
+
end
|
14
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require_gem 'RuCodeGen'
|
3
|
+
|
4
|
+
cpp_value_incapsulator :conn_params_t do |c|
|
5
|
+
c.decl_file :script_relative => "h/conn_params.impl.hpp"
|
6
|
+
c.impl_file :script_relative => "conn_params.impl.cpp"
|
7
|
+
|
8
|
+
c.attr_suffix "_"
|
9
|
+
|
10
|
+
c.attr :attempts, "int", :default => 3
|
11
|
+
c.attr :reconnect_timeout, "int", :default => 10
|
12
|
+
c.attr :restore_timeout, "int", :default => 5
|
13
|
+
end
|
14
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'mxx_ru/cpp'
|
2
|
+
require 'mxx_ru/cpp/rucodegen'
|
3
|
+
|
4
|
+
Mxx_ru::setup_target Mxx_ru::Cpp::Exe_target.new( "test/cpp/rucodegen/prj.rb" ) {
|
5
|
+
target "host_config"
|
6
|
+
|
7
|
+
rucodegen = generator Mxx_ru::Cpp::RuCodeGen.new( self )
|
8
|
+
|
9
|
+
cpp_source "host_config.cpp"
|
10
|
+
rucodegen << "host_config.rb"
|
11
|
+
|
12
|
+
sources_root( "impl" ) {
|
13
|
+
cpp_source "conn_params.cpp"
|
14
|
+
rucodegen.add "conn_params.rb"
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
Hello, World!
|
@@ -0,0 +1,128 @@
|
|
1
|
+
Hello, World!
|
2
|
+
Hello, World!
|
3
|
+
Hello, World!
|
4
|
+
Hello, World!
|
5
|
+
Hello, World!
|
6
|
+
Hello, World!
|
7
|
+
Hello, World!
|
8
|
+
Hello, World!
|
9
|
+
Hello, World!
|
10
|
+
Hello, World!
|
11
|
+
Hello, World!
|
12
|
+
Hello, World!
|
13
|
+
Hello, World!
|
14
|
+
Hello, World!
|
15
|
+
Hello, World!
|
16
|
+
Hello, World!
|
17
|
+
Hello, World!
|
18
|
+
Hello, World!
|
19
|
+
Hello, World!
|
20
|
+
Hello, World!
|
21
|
+
Hello, World!
|
22
|
+
Hello, World!
|
23
|
+
Hello, World!
|
24
|
+
Hello, World!
|
25
|
+
Hello, World!
|
26
|
+
Hello, World!
|
27
|
+
Hello, World!
|
28
|
+
Hello, World!
|
29
|
+
Hello, World!
|
30
|
+
Hello, World!
|
31
|
+
Hello, World!
|
32
|
+
Hello, World!
|
33
|
+
Hello, World!
|
34
|
+
Hello, World!
|
35
|
+
Hello, World!
|
36
|
+
Hello, World!
|
37
|
+
Hello, World!
|
38
|
+
Hello, World!
|
39
|
+
Hello, World!
|
40
|
+
Hello, World!
|
41
|
+
Hello, World!
|
42
|
+
Hello, World!
|
43
|
+
Hello, World!
|
44
|
+
Hello, World!
|
45
|
+
Hello, World!
|
46
|
+
Hello, World!
|
47
|
+
Hello, World!
|
48
|
+
Hello, World!
|
49
|
+
Hello, World!
|
50
|
+
Hello, World!
|
51
|
+
Hello, World!
|
52
|
+
Hello, World!
|
53
|
+
Hello, World!
|
54
|
+
Hello, World!
|
55
|
+
Hello, World!
|
56
|
+
Hello, World!
|
57
|
+
Hello, World!
|
58
|
+
Hello, World!
|
59
|
+
Hello, World!
|
60
|
+
Hello, World!
|
61
|
+
Hello, World!
|
62
|
+
Hello, World!
|
63
|
+
Hello, World!
|
64
|
+
Hello, World!
|
65
|
+
Hello, World!
|
66
|
+
Hello, World!
|
67
|
+
Hello, World!
|
68
|
+
Hello, World!
|
69
|
+
Hello, World!
|
70
|
+
Hello, World!
|
71
|
+
Hello, World!
|
72
|
+
Hello, World!
|
73
|
+
Hello, World!
|
74
|
+
Hello, World!
|
75
|
+
Hello, World!
|
76
|
+
Hello, World!
|
77
|
+
Hello, World!
|
78
|
+
Hello, World!
|
79
|
+
Hello, World!
|
80
|
+
Hello, World!
|
81
|
+
Hello, World!
|
82
|
+
Hello, World!
|
83
|
+
Hello, World!
|
84
|
+
Hello, World!
|
85
|
+
Hello, World!
|
86
|
+
Hello, World!
|
87
|
+
Hello, World!
|
88
|
+
Hello, World!
|
89
|
+
Hello, World!
|
90
|
+
Hello, World!
|
91
|
+
Hello, World!
|
92
|
+
Hello, World!
|
93
|
+
Hello, World!
|
94
|
+
Hello, World!
|
95
|
+
Hello, World!
|
96
|
+
Hello, World!
|
97
|
+
Hello, World!
|
98
|
+
Hello, World!
|
99
|
+
Hello, World!
|
100
|
+
Hello, World!
|
101
|
+
Hello, World!
|
102
|
+
Hello, World!
|
103
|
+
Hello, World!
|
104
|
+
Hello, World!
|
105
|
+
Hello, World!
|
106
|
+
Hello, World!
|
107
|
+
Hello, World!
|
108
|
+
Hello, World!
|
109
|
+
Hello, World!
|
110
|
+
Hello, World!
|
111
|
+
Hello, World!
|
112
|
+
Hello, World!
|
113
|
+
Hello, World!
|
114
|
+
Hello, World!
|
115
|
+
Hello, World!
|
116
|
+
Hello, World!
|
117
|
+
Hello, World!
|
118
|
+
Hello, World!
|
119
|
+
Hello, World!
|
120
|
+
Hello, World!
|
121
|
+
Hello, World!
|
122
|
+
Hello, World!
|
123
|
+
Hello, World!
|
124
|
+
Hello, World!
|
125
|
+
Hello, World!
|
126
|
+
Hello, World!
|
127
|
+
Hello, World!
|
128
|
+
Hello, World!
|
@@ -0,0 +1,89 @@
|
|
1
|
+
/*
|
2
|
+
�������� ���������� ��� �������� Textfile_unittest_target.
|
3
|
+
|
4
|
+
�������� � ��������� ������ ��� ���������:
|
5
|
+
- ��� ��������������� �����;
|
6
|
+
- ���������� �����, ������� ������ ���� �������� � ����.
|
7
|
+
|
8
|
+
������� ��������� �������������� ��������� ���� � ����������
|
9
|
+
� ���� ��������� ���������� ����� "Hello, World!".
|
10
|
+
*/
|
11
|
+
|
12
|
+
#include <iostream>
|
13
|
+
#include <fstream>
|
14
|
+
#include <sstream>
|
15
|
+
#include <stdexcept>
|
16
|
+
|
17
|
+
void
|
18
|
+
show_usage()
|
19
|
+
{
|
20
|
+
std::cout << "test <out_file_name> <line_count>" << std::endl;
|
21
|
+
}
|
22
|
+
|
23
|
+
void
|
24
|
+
parse_args(
|
25
|
+
int argc, char ** argv,
|
26
|
+
std::string & out_file_name,
|
27
|
+
unsigned int & line_count )
|
28
|
+
{
|
29
|
+
if( 3 == argc )
|
30
|
+
{
|
31
|
+
out_file_name = argv[ 1 ];
|
32
|
+
|
33
|
+
try
|
34
|
+
{
|
35
|
+
std::istringstream line_count_stream( argv[ 2 ] );
|
36
|
+
line_count_stream.exceptions(
|
37
|
+
std::ios::badbit | std::ios::failbit );
|
38
|
+
line_count_stream >> line_count;
|
39
|
+
}
|
40
|
+
catch( const std::ios::failure & )
|
41
|
+
{
|
42
|
+
throw std::domain_error(
|
43
|
+
"Unable to parse line_count argument: " +
|
44
|
+
std::string( argv[ 2 ] ) );
|
45
|
+
}
|
46
|
+
}
|
47
|
+
else
|
48
|
+
{
|
49
|
+
show_usage();
|
50
|
+
throw std::runtime_error( "Invalid arguments" );
|
51
|
+
}
|
52
|
+
}
|
53
|
+
|
54
|
+
void
|
55
|
+
create_out_file(
|
56
|
+
const std::string & file_name,
|
57
|
+
unsigned int line_count )
|
58
|
+
{
|
59
|
+
std::ofstream to( file_name.c_str() );
|
60
|
+
if( !to )
|
61
|
+
throw std::runtime_error( "Unable to create file: " +
|
62
|
+
file_name );
|
63
|
+
|
64
|
+
while( line_count-- )
|
65
|
+
to << "Hello, World!" << std::endl;
|
66
|
+
}
|
67
|
+
|
68
|
+
int
|
69
|
+
main( int argc, char ** argv )
|
70
|
+
{
|
71
|
+
int rc = 1;
|
72
|
+
|
73
|
+
try
|
74
|
+
{
|
75
|
+
std::string out_file_name;
|
76
|
+
unsigned int line_count;
|
77
|
+
parse_args( argc, argv, out_file_name, line_count );
|
78
|
+
|
79
|
+
create_out_file( out_file_name, line_count );
|
80
|
+
|
81
|
+
rc = 0;
|
82
|
+
}
|
83
|
+
catch( const std::exception & x )
|
84
|
+
{
|
85
|
+
std::cerr << "Oops! " << x.what() << std::endl;
|
86
|
+
}
|
87
|
+
|
88
|
+
return rc;
|
89
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'mxx_ru/textfile_unittest'
|
2
|
+
|
3
|
+
Mxx_ru::setup_target(
|
4
|
+
Mxx_ru::Textfile_unittest_target.new(
|
5
|
+
"prj.ut.rb", "prj.rb" ) {
|
6
|
+
|
7
|
+
launch( "out_0.txt 0",
|
8
|
+
[ pair( "out_0.txt", "etalons/out_0.txt" ) ] )
|
9
|
+
|
10
|
+
launch( "out_1.txt 1",
|
11
|
+
[ pair( "out_1.txt", "etalons/out_1.txt" ) ] )
|
12
|
+
|
13
|
+
launch( "out_128.txt 128",
|
14
|
+
[ pair( "out_0.txt", "etalons/out_0.txt" ),
|
15
|
+
pair( "out_1.txt", "etalons/out_1.txt" ),
|
16
|
+
pair( "out_128.txt", "etalons/out_128.txt" ) ] )
|
17
|
+
}
|
18
|
+
)
|
@@ -0,0 +1,72 @@
|
|
1
|
+
Microsoft (R) Incremental Linker Version 7.10.3077
|
2
|
+
Copyright (C) Microsoft Corporation. All rights reserved.
|
3
|
+
|
4
|
+
usage: LINK [options] [files] [@commandfile]
|
5
|
+
|
6
|
+
options:
|
7
|
+
|
8
|
+
/ALIGN:#
|
9
|
+
/ALLOWBIND[:NO]
|
10
|
+
/ASSEMBLYDEBUG[:DISABLE]
|
11
|
+
/ASSEMBLYLINKRESOURCE:filename
|
12
|
+
/ASSEMBLYMODULE:filename
|
13
|
+
/ASSEMBLYRESOURCE:filename
|
14
|
+
/BASE:{address|@filename,key}
|
15
|
+
/DEBUG
|
16
|
+
/DEF:filename
|
17
|
+
/DEFAULTLIB:library
|
18
|
+
/DELAY:{NOBIND|UNLOAD}
|
19
|
+
/DELAYLOAD:dll
|
20
|
+
/DELAYSIGN[:NO]
|
21
|
+
/DLL
|
22
|
+
/DRIVER[:{UPONLY|WDM}]
|
23
|
+
/ENTRY:symbol
|
24
|
+
/EXETYPE:DYNAMIC
|
25
|
+
/EXPORT:symbol
|
26
|
+
/FIXED[:NO]
|
27
|
+
/FORCE[:{MULTIPLE|UNRESOLVED}]
|
28
|
+
/HEAP:reserve[,commit]
|
29
|
+
/IDLOUT:filename
|
30
|
+
/IGNOREIDL
|
31
|
+
/IMPLIB:filename
|
32
|
+
/INCLUDE:symbol
|
33
|
+
/INCREMENTAL[:NO]
|
34
|
+
/KEYFILE:filename
|
35
|
+
/KEYCONTAINER:name
|
36
|
+
/LARGEADDRESSAWARE[:NO]
|
37
|
+
/LIBPATH:dir
|
38
|
+
/LTCG[:{NOSTATUS|PGINSTRUMENT|PGOPTIMIZE|STATUS}]
|
39
|
+
(PGINSTRUMENT and PGOPTIMIZE are only available for IA64)
|
40
|
+
/MACHINE:{AM33|ARM|EBC|IA64|M32R|MIPS|MIPS16|MIPSFPU|MIPSFPU16|MIPSR41XX|
|
41
|
+
SH3|SH3DSP|SH4|SH5|THUMB|X86}
|
42
|
+
/MAP[:filename]
|
43
|
+
/MAPINFO:{EXPORTS|LINES}
|
44
|
+
/MERGE:from=to
|
45
|
+
/MIDL:@commandfile
|
46
|
+
/NOASSEMBLY
|
47
|
+
/NODEFAULTLIB[:library]
|
48
|
+
/NOENTRY
|
49
|
+
/NOLOGO
|
50
|
+
/OPT:{ICF[=iterations]|NOICF|NOREF|NOWIN98|REF|WIN98}
|
51
|
+
/ORDER:@filename
|
52
|
+
/OUT:filename
|
53
|
+
/PDB:filename
|
54
|
+
/PDBSTRIPPED:filename
|
55
|
+
/PGD:filename
|
56
|
+
/RELEASE
|
57
|
+
/SAFESEH[:NO]
|
58
|
+
/SECTION:name,[E][R][W][S][D][K][L][P][X][,ALIGN=#]
|
59
|
+
/STACK:reserve[,commit]
|
60
|
+
/STUB:filename
|
61
|
+
/SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|
|
62
|
+
EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|
|
63
|
+
WINDOWSCE}[,#[.##]]
|
64
|
+
/SWAPRUN:{CD|NET}
|
65
|
+
/TLBOUT:filename
|
66
|
+
/TSAWARE[:NO]
|
67
|
+
/TLBID:#
|
68
|
+
/VERBOSE[:{LIB|SAFESEH}]
|
69
|
+
/VERSION:#[.#]
|
70
|
+
/VXD
|
71
|
+
/WINDOWSCE:{CONVERT|EMULATION}
|
72
|
+
/WS:AGGRESSIVE
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'mxx_ru/cpp'
|
4
|
+
|
5
|
+
Mxx_ru::Cpp::dll_target( "prj_dll_with_implib_simple_target_root.rb" ) {
|
6
|
+
|
7
|
+
target_root( "simple_target_root" )
|
8
|
+
target( "dll_with_implib_simple_target_root" )
|
9
|
+
|
10
|
+
implib_path( "lib" )
|
11
|
+
|
12
|
+
cpp_source( "dll_hi.cpp" )
|
13
|
+
}
|
14
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
class TC_VcCleanup < Test::Unit::TestCase
|
4
|
+
TEST_FOLDER = 'tests/cpp/vc_cleanup'
|
5
|
+
RUBYLIB_FOLDER = '../../../lib'
|
6
|
+
|
7
|
+
def initialize( test_case_name )
|
8
|
+
super( test_case_name )
|
9
|
+
|
10
|
+
# We can be started from tests/cpp/vc_cleanup folder or from
|
11
|
+
# root project folder. If we are in test folder already then
|
12
|
+
# we need no change current work directory.
|
13
|
+
@need_change_cwd = !File.exists?( File.basename( __FILE__ ) )
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_cleanup
|
17
|
+
if @need_change_cwd
|
18
|
+
Dir.chdir( TEST_FOLDER ) do do_test end
|
19
|
+
else
|
20
|
+
do_test
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def do_test
|
25
|
+
project_files = Dir[ 'prj_*.rb' ]
|
26
|
+
|
27
|
+
build_all_targets( project_files )
|
28
|
+
clean_all_targets( project_files )
|
29
|
+
|
30
|
+
garbage_files = Dir.glob( "**/*.{ilk,pdb,lib,exp}" )
|
31
|
+
|
32
|
+
# No garbage files should exit.
|
33
|
+
assert_equal( 0, garbage_files.size )
|
34
|
+
end
|
35
|
+
|
36
|
+
def build_all_targets( project_files )
|
37
|
+
# Running all projects to build targets.
|
38
|
+
project_files.each do |prj|
|
39
|
+
command = "ruby -I#{RUBYLIB_FOLDER} #{prj} --mxx-cpp-debug"
|
40
|
+
run_and_check_command( command )
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def clean_all_targets( project_files )
|
45
|
+
# Running all projects to clean up targets.
|
46
|
+
project_files.each do |prj|
|
47
|
+
command = "ruby -I#{RUBYLIB_FOLDER} #{prj} --mxx-clean"
|
48
|
+
run_and_check_command( command )
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def run_and_check_command( command )
|
53
|
+
started = system( command )
|
54
|
+
assert(
|
55
|
+
started && $? == 0,
|
56
|
+
"some problems in running #{command}: " +
|
57
|
+
"started: #{started}, exit status: #{$?}" )
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|