Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add YueScript as an additional scripting language #2743

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify build
  • Loading branch information
Kaleidosium committed Feb 20, 2025
commit f1babe0fc873ec82ae33dca9097f7fa6a5bf7dda
23 changes: 22 additions & 1 deletion cmake/yue.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,28 @@ if(BUILD_WITH_YUE)
${CMAKE_SOURCE_DIR}/src
)

target_compile_definitions(yuescript PRIVATE YUE_NO_MACRO)
target_compile_definitions(yuescript PRIVATE
YUE_NO_MACRO
$<$<BOOL:${MSVC}>:_SCL_SECURE_NO_WARNINGS>
)

# Platform specific configurations
if(BAREMETALPI OR NINTENDO_3DS)
# Disable thread-safe statics on embedded platforms for C++ files
set_source_files_properties(
${YUESCRIPT_SRC}
PROPERTIES COMPILE_FLAGS "-fno-threadsafe-statics -fno-rtti -fno-thread-local-storage"
)

# Force static linking for baremetal
set_target_properties(yuescript PROPERTIES
STATIC_LIBRARY TRUE
POSITION_INDEPENDENT_CODE FALSE
)

target_compile_features(yuescript PRIVATE cxx_std_17)
target_compile_options(yuescript PRIVATE -fno-thread-local-storage -fno-rtti)
endif()

if(MSVC)
target_compile_definitions(yuescript PRIVATE _SCL_SECURE_NO_WARNINGS)
Expand Down