Skip to content

Commit

Permalink
fix: manually generate export header for detector.h
Browse files Browse the repository at this point in the history
  • Loading branch information
fmoessbauer committed Dec 10, 2019
1 parent 9fa43af commit a3424a4
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 11 deletions.
1 change: 1 addition & 0 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include(${PROJECT_SOURCE_DIR}/CMakeExt/git_watcher.cmake)
# Common header-only target
add_library("drace-common" INTERFACE)
target_include_directories("drace-common" INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_compile_definitions("drace-common" INTERFACE "DETECTOR_EXPORTS")
add_dependencies("drace-common" check_git_repository)

################ configure test module ################
Expand Down
16 changes: 14 additions & 2 deletions common/detector/Detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@

#include <utility>

// this is a header only target, hence we cannot rely on cmake
// to generate the export headers.
#ifdef WIN32
#ifdef DETECTOR_EXPORTS
#define DETECTOR_EXPORT __declspec(dllexport)
#else
#define DETECTOR_EXPORT __declspec(dllimport)
#endif
#else
#define DETECTOR_EXPORT
#endif

/**
Interface for a DRace compatible race detector
Expand All @@ -22,7 +34,7 @@
- A read or write will never contain a tid which was not forked
- A read can happen before a write
- A read and a write with the same TID will never arrive concurrently
- A happens after may arrive before a corresponding happens beore arrives
- A happens after may arrive before a corresponding happens before arrives
- A lock may be be released, before it will be acquired
-> the last three bullet points must not cause a crash
Expand Down Expand Up @@ -204,4 +216,4 @@ class Detector {
};

/// create a new detector instance
extern "C" Detector * CreateDetector();
extern "C" DETECTOR_EXPORT Detector * CreateDetector();
2 changes: 1 addition & 1 deletion vendor/gabime/spdlog
Submodule spdlog updated 116 files
2 changes: 1 addition & 1 deletion vendor/google/benchmark
Submodule benchmark updated 88 files
+1 −1 .clang-format
+0 −5 .gitignore
+11 −52 .travis.yml
+0 −8 AUTHORS
+0 −2 BUILD.bazel
+14 −38 CMakeLists.txt
+1 −12 CONTRIBUTORS
+459 −779 README.md
+3 −11 WORKSPACE
+0 −1 _config.yml
+7 −1 appveyor.yml
+7 −7 cmake/CXXFeatureCheck.cmake
+1 −1 cmake/GetGitVersion.cmake
+0 −41 cmake/GoogleTest.cmake
+0 −58 cmake/GoogleTest.cmake.in
+113 −0 cmake/HandleGTest.cmake
+0 −1 cmake/benchmark.pc.in
+0 −7 conan/CMakeLists.txt
+0 −10 conan/test_package/CMakeLists.txt
+0 −19 conan/test_package/conanfile.py
+0 −18 conan/test_package/test_package.cpp
+0 −79 conanfile.py
+0 −18 dependencies.md
+0 −1 docs/_config.yml
+71 −28 docs/tools.md
+77 −216 include/benchmark/benchmark.h
+1 −1 mingw.py
+16 −23 src/CMakeLists.txt
+276 −140 src/benchmark.cc
+0 −15 src/benchmark_api_internal.cc
+5 −11 src/benchmark_api_internal.h
+0 −58 src/benchmark_name.cc
+23 −68 src/benchmark_register.cc
+9 −83 src/benchmark_register.h
+0 −361 src/benchmark_runner.cc
+0 −51 src/benchmark_runner.h
+1 −1 src/colorprint.cc
+31 −41 src/commandlineflags.cc
+15 −39 src/commandlineflags.h
+13 −31 src/complexity.cc
+42 −37 src/console_reporter.cc
+3 −15 src/counter.cc
+1 −7 src/counter.h
+18 −23 src/csv_reporter.cc
+1 −16 src/cycleclock.h
+11 −12 src/internal_macros.h
+21 −79 src/json_reporter.cc
+2 −20 src/reporter.cc
+1 −1 src/sleep.cc
+13 −29 src/statistics.cc
+6 −86 src/string_util.cc
+3 −23 src/string_util.h
+10 −131 src/sysinfo.cc
+4 −2 src/thread_manager.h
+6 −23 src/thread_timer.h
+3 −3 src/timers.cc
+20 −28 test/BUILD
+27 −39 test/CMakeLists.txt
+4 −4 test/basic_test.cc
+1 −96 test/benchmark_gtest.cc
+0 −74 test/benchmark_name_gtest.cc
+0 −201 test/commandlineflags_gtest.cc
+18 −64 test/complexity_test.cc
+1 −1 test/cxx03_test.cc
+0 −43 test/display_aggregates_only_test.cc
+0 −184 test/internal_threading_test.cc
+0 −44 test/memory_manager_test.cc
+2 −1 test/multiple_ranges_test.cc
+0 −10 test/options_test.cc
+2 −11 test/output_test.h
+4 −98 test/output_test_helper.cc
+2 −2 test/register_benchmark_test.cc
+0 −39 test/report_aggregates_only_test.cc
+76 −439 test/reporter_output_test.cc
+2 −2 test/skip_with_error_test.cc
+1 −1 test/state_assembly_test.cc
+0 −153 test/string_util_gtest.cc
+51 −84 test/user_counters_tabular_test.cc
+30 −326 test/user_counters_test.cc
+0 −173 test/user_counters_thousands_test.cc
+24 −60 tools/compare.py
+67 −0 tools/compare_bench.py
+1 −18 tools/gbench/Inputs/test1_run1.json
+1 −18 tools/gbench/Inputs/test1_run2.json
+1 −27 tools/gbench/Inputs/test3_run0.json
+4 −30 tools/gbench/Inputs/test3_run1.json
+92 −309 tools/gbench/report.py
+5 −10 tools/gbench/util.py
2 changes: 1 addition & 1 deletion vendor/google/googletest
Submodule googletest updated 344 files
2 changes: 1 addition & 1 deletion vendor/jtilly/inih
Submodule inih updated 2 files
+17 −38 INIReader.h
+1 −1 README.md
2 changes: 1 addition & 1 deletion vendor/leethomason/tinyxml2
Submodule tinyxml2 updated 6 files
+8 −16 CMakeLists.txt
+1 −1 dox
+2 −2 readme.md
+24 −112 tinyxml2.cpp
+14 −55 tinyxml2.h
+8 −99 xmltest.cpp
2 changes: 1 addition & 1 deletion vendor/muellan/clipp

0 comments on commit a3424a4

Please sign in to comment.