This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Support build on Windows with MSVC 15.7 (#85) #93
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1f18c88
Support build on Windows with MSVC 15.7 (#85)
mdouaihy b762fa4
Exclude dynamic_load_windows.cpp from bazel build.
mdouaihy 51fcc6d
Handlle multiple symbols problem when linking directly with tracer im…
mdouaihy 71bccd9
Format the error message when doing Windows calls.
mdouaihy 4a1c918
Enrich the README with instructions to build and test under Windows.
mdouaihy f4bcbc2
Dont declare the Fontions when registering them for OpenTracing dynam…
mdouaihy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: '{build}' | ||
|
||
image: Visual Studio 2017 | ||
|
||
init: | ||
- cmd: git config --global core.autocrlf true | ||
|
||
platform: | ||
- x64 | ||
|
||
configuration: | ||
- Debug | ||
- Release | ||
|
||
before_build: | ||
- cmake -H. -Bbuild -A%PLATFORM% -DBUILD_TESTING=ON | ||
|
||
build: | ||
project: build\opentracing-cpp.sln | ||
parallel: false | ||
verbosity: normal | ||
|
||
test_script: | ||
- ps: | | ||
cd build | ||
ctest -V -C $env:configuration --timeout 600 --output-on-failure |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
if (BUILD_MOCKTRACER AND BUILD_SHARED_LIBS) | ||
include_directories(../../mocktracer/include) | ||
add_executable(tutorial-example tutorial-example.cpp) | ||
target_link_libraries(tutorial-example opentracing_mocktracer) | ||
add_test(tutorial-example tutorial-example) | ||
target_link_libraries(tutorial-example opentracing_mocktracer) | ||
add_test(NAME tutorial-example COMMAND tutorial-example) | ||
endif() |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef OPENTRACING_SYMBOLS_H | ||
#define OPENTRACING_SYMBOLS_H | ||
|
||
#include <opentracing/config.h> | ||
|
||
#ifdef _MSC_VER | ||
#pragma warning(push) | ||
#pragma warning(disable : 4251) | ||
#endif | ||
|
||
#ifdef _MSC_VER | ||
|
||
#define OPENTRACING_EXPORT __declspec(dllexport) | ||
|
||
// Export if this is our own source, otherwise import: | ||
#ifndef OPENTRACING_STATIC | ||
#ifdef OPENTRACING_EXPORTS | ||
#define OPENTRACING_API __declspec(dllexport) | ||
#else // OPENTRACING_STATIC | ||
#define OPENTRACING_API __declspec(dllimport) | ||
#endif // OPENTRACING_EXPORTS | ||
#endif // OPENTRACING_STATIC | ||
|
||
#endif // _MSC_VER | ||
|
||
#ifndef OPENTRACING_EXPORT | ||
#define OPENTRACING_EXPORT | ||
#endif | ||
|
||
#ifndef OPENTRACING_API | ||
#define OPENTRACING_API | ||
#endif | ||
|
||
#endif // OPENTRACING_SYMBOLS_H |
This file contains 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
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need these declarations:
All that needs to be exposed is the variable
OpenTracingMakeTracerFactory
.X
can be a static function in the translation unit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This declaration is useful so that
can be declared anywhere in the translation unit.
change done.