mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Stop globbing and add flags
This commit is contained in:
parent
a0eb0b4313
commit
368f575084
|
@ -11,13 +11,58 @@ if (LUA_VERSION MATCHES "5.1")
|
|||
Find_Package(Lua 5.1 EXACT REQUIRED)
|
||||
elseif(LUA_VERSION MATCHES "5.2")
|
||||
Find_Package(Lua 5.2 EXACT REQUIRED)
|
||||
elseif(NOT LUA_VERSION OR LUA_VERSION MATCHES "5.3")
|
||||
elseif(LUA_VERSION MATCHES "5.3")
|
||||
Find_Package(Lua 5.3 EXACT REQUIRED)
|
||||
else()
|
||||
message(FATAL_ERROR "${LUA_VERSION} is not a supported version for lua.")
|
||||
endif()
|
||||
|
||||
include_directories(${LUA_INCLUDE_DIRS})
|
||||
|
||||
file(GLOB EXAMPLES_SRC examples/*.cpp)
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning -Wno-unknown-warning-option -Wall -Wextra -Wpedantic -pedantic -pedantic-errors -Wno-noexcept-type -ftemplate-depth=1024")
|
||||
endif()
|
||||
|
||||
set(EXAMPLES_SRC examples/any_return.cpp
|
||||
examples/basic.cpp
|
||||
examples/calling_lua_functions.cpp
|
||||
examples/config.cpp
|
||||
examples/containers_as_table.cpp
|
||||
examples/containers.cpp
|
||||
examples/container_usertype_as_container.cpp
|
||||
examples/coroutine.cpp
|
||||
examples/customization.cpp
|
||||
examples/dynamic_object.cpp
|
||||
examples/environments.cpp
|
||||
examples/environment_snooping.cpp
|
||||
examples/environments_on_functions.cpp
|
||||
examples/functions.cpp
|
||||
examples/multi_results.cpp
|
||||
examples/namespacing.cpp
|
||||
examples/optional_with_iteration.cpp
|
||||
examples/overloading.cpp
|
||||
examples/overloading_with_fallback.cpp
|
||||
examples/protected_functions.cpp
|
||||
examples/require.cpp
|
||||
examples/runtime_additions.cpp
|
||||
examples/script_error_handling.cpp
|
||||
examples/self_call.cpp
|
||||
examples/self_from_lua.cpp
|
||||
examples/stack_aligned_function.cpp
|
||||
examples/static_variables.cpp
|
||||
examples/tables.cpp
|
||||
examples/usertype_advanced.cpp
|
||||
examples/usertype_automatic_operators.cpp
|
||||
examples/usertype_bitfields.cpp
|
||||
examples/usertype_call_from_c++.cpp
|
||||
examples/usertype.cpp
|
||||
examples/usertype_dynamic_getter_setter.cpp
|
||||
examples/usertype_initializers.cpp
|
||||
examples/usertype_simple.cpp
|
||||
examples/usertype_special_functions.cpp
|
||||
examples/usertype_var.cpp
|
||||
examples/variables.cpp
|
||||
examples/variadic_args.cpp)
|
||||
source_group(examples FILES ${EXAMPLES_SRC})
|
||||
foreach(example_source_file ${EXAMPLES_SRC})
|
||||
message(STATUS "${example_source_file}")
|
||||
|
|
Loading…
Reference in New Issue
Block a user