Skip to content

Commit

Permalink
[WIP] Debug windows static compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
hoolioh committed Aug 19, 2024
1 parent cc31874 commit bc99dfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions examples/ffi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ function(set_vcruntime_link_type binary link_type)
if (link_type STREQUAL "DLL")
set_property(TARGET ${binary} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set_property(TARGET ${binary} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set_property(TARGET ${binary} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
endif()
endfunction()

# Uncomment to debug build commands
# set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_VERBOSE_MAKEFILE ON)

add_executable(exporter exporter.cpp)
# needed for designated initializers
Expand All @@ -32,6 +32,7 @@ target_link_libraries(crashinfo PRIVATE Datadog::Profiling)


if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
target_compile_definitions(exporter PUBLIC _CRT_SECURE_NO_WARNINGS)
endif()

Expand Down
4 changes: 2 additions & 2 deletions examples/ffi/trace_exporter.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/
// SPDX-License-Identifier: Apache-2.0

#include <stdio.h>
#include <stdlib.h>
#include <datadog/common.h>
#include <datadog/data-pipeline.h>
#include <stdio.h>
#include <stdlib.h>

#define TRY(expr) \
{ \
Expand Down

0 comments on commit bc99dfc

Please sign in to comment.