Skip to content

Commit

Permalink
wchar_t -> char; fixed archiving of inputs and lexemes
Browse files Browse the repository at this point in the history
  • Loading branch information
tklip committed Aug 26, 2020
1 parent 0ff2b80 commit e6e2f0d
Show file tree
Hide file tree
Showing 55 changed files with 3,832 additions and 3,231 deletions.
4 changes: 3 additions & 1 deletion debug-js.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/bash

./build.sh Debug -DBUILD_JSLIB=1 $@
cp js/test.html js/tmljs build-Debug/
cp js/test.html js/tmljs build-Debug/
2 changes: 2 additions & 0 deletions debug.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/bin/bash

./build.sh Debug $@
10 changes: 5 additions & 5 deletions js/embindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ EMSCRIPTEN_BINDINGS(tml) {
.class_function("gc", &bdd::gc)
;
class_<driver>("driver")
.constructor<std::wstring, options>()
.constructor<string_t, options>()
.class_function("create",
optional_override([](std::wstring s, options o) {
optional_override([](string_t s, options o) {
return new driver(s, o);
}), allow_raw_pointers())
.class_function("create",
Expand Down Expand Up @@ -77,16 +77,16 @@ EMSCRIPTEN_BINDINGS(tml) {
.function("get_bool", &options::get_bool)
.function("get_string", &options::get_string)
.function("to_string", optional_override([](options& o) {
std::wstringstream wss; wss << o;
ostringstream_t wss; wss << o;
return wss.str();
}), allow_raw_pointers())
;
class_<output>("output")
.function("name", &output::name)
.function("type", &output::type)
//.function("os", &output::os)
.function("target", select_overload<std::wstring()const>(&output::target), allow_raw_pointers())
//.function("set_target", select_overload<type_t(std::wstring)>(&output::target))
.function("target", select_overload<string_t()const>(&output::target), allow_raw_pointers())
//.function("set_target", select_overload<type_t(string_t)>(&output::target))
//.function("target", &output::target)
.function("read", &output::read)
.function("is_null", &output::is_null)
Expand Down
2 changes: 2 additions & 0 deletions release-js.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
#!/bin/bash

./build.sh Release -DBUILD_JSLIB=1 $@
cp js/test.html js/tmljs build-Release/
2 changes: 2 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
#!/bin/bash

./build.sh Release $@
17 changes: 16 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ target_include_directories(TMLo PUBLIC
if (WITH_THREADS)
target_compile_definitions(TMLo PRIVATE "-DWITH_THREADS")
endif ()
if (WITH_WCHAR)
target_compile_definitions(TMLo PRIVATE "-DWITH_WCHAR")
endif ()

# boost
###########
Expand All @@ -99,6 +102,13 @@ if (WITH_BOOST)
endif (Boost_FOUND)
endif ()

# pthreads
###########
if (WITH_THREADS)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads)
endif()

# shared library
#################

Expand Down Expand Up @@ -146,7 +156,9 @@ if (WITH_THREADS)
target_compile_definitions(tml PRIVATE "-DWITH_THREADS")
target_link_libraries(tml Threads::Threads)
endif()

if (WITH_WCHAR)
target_compile_definitions(tml PRIVATE "-DWITH_WCHAR")
endif ()

# executable using shared library
##################################
Expand All @@ -161,6 +173,9 @@ if (WITH_THREADS)
target_compile_definitions(tml_shared PRIVATE "-DWITH_THREADS")
target_link_libraries(tml_shared Threads::Threads)
endif()
if (WITH_WCHAR)
target_compile_definitions(tml_shared PRIVATE "-DWITH_WCHAR")
endif ()
exclude(tml_shared)


Expand Down
Loading

0 comments on commit e6e2f0d

Please sign in to comment.