Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Add NOMINMAX definitions when compiling with MSVC #283

Merged
merged 9 commits into from
Feb 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions opencensus/common/internal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ opencensus_lib(common_random

opencensus_lib(common_stats_object DEPS absl::time)

# Define NOMINMAX to fix build errors when compiling with MSVC.
target_compile_definitions(opencensus_common_stats_object INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:NOMINMAX>)

opencensus_lib(common_string_vector_hash)

opencensus_test(common_random_test random_test.cc common_random)
Expand Down
4 changes: 4 additions & 0 deletions opencensus/stats/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ opencensus_lib(stats_core
absl::optional
absl::span)

# Define NOMINMAX to fix build errors when compiling with MSVC.
target_compile_definitions(opencensus_stats_core PUBLIC
$<$<CXX_COMPILER_ID:MSVC>:NOMINMAX>)

opencensus_lib(stats_recording
SRCS
internal/recording.cc
Expand Down