Skip to content

Commit

Permalink
Bundle sources
Browse files Browse the repository at this point in the history
Contributes to CURA-11482
  • Loading branch information
jellespijker committed Jan 12, 2024
1 parent 5299ec7 commit f699c56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.23)
find_package(standardprojectsettings REQUIRED)
find_package(protobuf REQUIRED)

option(ENABLE_SENTRY "Send crash data via Sentry" OFF)

set(arcus_SRCS
src/Socket.cpp
src/SocketListener.cpp
Expand Down Expand Up @@ -37,4 +39,7 @@ if(WIN32)

target_link_libraries(Arcus PUBLIC Ws2_32)
set_target_properties(Arcus PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
if (ENABLE_SENTRY)
set_target_properties(CuraEngine PROPERTIES LINK_FLAGS "/DEBUG:FULL")
endif ()
endif()
4 changes: 3 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def build_requirements(self):

def generate(self):
tc = CMakeToolchain(self)
tc.variables["ENABLE_SENTRY"] = self.options.get_safe("enable_sentry", False)
if is_msvc(self):
tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self)
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW"
Expand All @@ -129,8 +130,9 @@ def build(self):
self.run(f"sentry-cli -V", output=output)
if "sentry-cli" not in output.getvalue():
raise ConanInvalidSystemRequirements("sentry-cli is not installed")
build_source_dir = self.build_path.parent.parent.as_posix()
self.output.info("Uploading debug symbols to sentry")
self.run(f"sentry-cli debug-files upload --include-sources -o {sentry_org} -p {sentry_project} .")
self.run(f"sentry-cli debug-files upload --include-sources -o {sentry_org} -p {sentry_project} {build_source_dir}")


def package(self):
Expand Down

0 comments on commit f699c56

Please sign in to comment.