This file contains hidden or 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
| cmake_minimum_required( VERSION 3.2 ) | |
| include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) | |
| link_directories(${CMAKE_CURRENT_BINARY_DIR}/lib) | |
| include( ExternalProject ) | |
| set( zlib_source_path ${CMAKE_CURRENT_BINARY_DIR}/external/zlib/src/external_zlib/ ) | |
| set( zlib_cmake_file_path ${zlib_source_path}/CMakeLists.txt ) |
This file contains hidden or 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
| namespace usagi | |
| { | |
| namespace lua | |
| { | |
| /// @brief lua_state に name が関数として定義されているか確認する | |
| /// @param name 確認したい関数のシンボル名 | |
| auto is_function( c::lua_State* lua_state, const std::string& name ) | |
| { | |
| lua_getglobal( lua_state, name.c_str() ); | |
| const auto r = static_cast< bool >( lua_isfunction( lua_state, -1 ) ); |
This file contains hidden or 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
| CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/ExternalProject.cmake:1743 (message): | |
| error: git version 1.6.5 or later required for 'git submodule update | |
| --recursive': GIT_VERSION_STRING='' |
This file contains hidden or 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
| function hoge( a, b ) | |
| return a + b, a - b, a / b, a .. b | |
| end |
This file contains hidden or 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
| auto tuple = std::make_tuple( 1, 2.3f, '4', "567" ); | |
| auto functor = []( auto value ){ std::cout << value << "\n"; }; | |
| apply( tuple, functor ); // <-- これを作りたい |
This file contains hidden or 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
| #include <lua.hpp> | |
| #include <iostream> | |
| #include <vector> | |
| #include <new> | |
| #include <mutex> | |
| #include <stdexcept> | |
| namespace usagi | |
| { | |
| namespace lua |
This file contains hidden or 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
| struct f32vec4 | |
| { | |
| float x, y, z, w; | |
| f32vec4( const float a = 0, const float b = 0, const float c = 0, const float d = 0 ) | |
| : x( a ), y( b ), z( c ), w( d ) | |
| { } | |
| }; | |
| using native_data_type = std::vector< f32vec4 >; |
This file contains hidden or 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
| file( GLOB_RECURSE lua_sources ${lua_path}/src/*.c ) | |
| list( REMOVE_ITEM lua_sources | |
| ${lua_path}/src/lua.c | |
| ${lua_path}/src/luac.c | |
| ) |
This file contains hidden or 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
| $env:path = "$(cmd /c cd);" + $env:path |
This file contains hidden or 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
| { "command": "sh" | |
| , "args": ["-c"] | |
| , "windows": | |
| { "command": "cmd" | |
| , "args": ["/c"] | |
| } | |
| , "tasks": | |
| [ { "taskName": "hoge" | |
| , "suppressTaskName": true | |
| , "isBuildCommand": true |