add ilib_language to retrieve compiler capabilities
[scilab.git] / scilab / contrib / toolbox_skeleton / sci_gateway / cpp / builder_gateway_cpp.sce
1 // This file is released under the 3-clause BSD license. See COPYING-BSD.
2
3 function builder_gw_cpp()
4
5     includes_src_c = ilib_include_flag(get_absolute_file_path("builder_gateway_cpp.sce") + "../../src/c");
6
7     //adapt to compiler capabilities
8     l = ilib_language();
9     if ~isempty(grep(l, "cppsci")) then
10         tbx_build_gateway("skeleton_cpp", ..
11             ["cpp_find","sci_cpp_find", "csci"; ..
12             "cpp_error", "sci_cpperror", "cppsci"; ..
13             "cpp_foo", "sci_cppfoo", "cppsci"; ..
14             "cpp_sum", "sci_cppsum", "cppsci"; ..
15             "cpp_sub", "sci_cppsub", "cppsci"; ..
16             "cpp_multiplybypi", "sci_cppmultiplybypi", "cppsci"], ..
17             ["sci_cpp_find.cxx", "sci_cpperror.cpp", "sci_cppfoo.cpp", "sci_cppsum.cpp", "sci_cppsub.cpp", "sci_cppmultiplybypi.cpp"], ..
18             get_absolute_file_path("builder_gateway_cpp.sce"), ..
19             ["../../src/c/libcsum"], ..
20             "", ..
21             includes_src_c);
22     else
23         tbx_build_gateway("skeleton_cpp", ..
24             ["cpp_find","sci_cpp_find", "csci"], ..
25             ["sci_cpp_find.cxx"], ..
26             get_absolute_file_path("builder_gateway_cpp.sce"), ..
27             ["../../src/c/libcsum"], ..
28             "", ..
29             includes_src_c);
30     end
31 endfunction
32
33 builder_gw_cpp();
34 clear builder_gw_cpp; // remove builder_gw_cpp on stack