Skip to content

Conversation

@BillyONeal
Copy link
Contributor

No description provided.

This change looks for CMake's default setting for MSVC++, /W3 (and any
other level should that change in the future), and removes it before
adding /W4. This stops the build for MSVC++ emitting warnings about
/W4 overriding /W3 earlier on the command line.
BENCHMARK_ENABLE_LTO=true was completely replacing
CMAKE_CXX_FLAGS_RELEASE; meaning neither CMake's release defaults nor
user customizations were being applied.
In addition to release, CMake supports RELWITHDEBINFO and MINSIZEREL
build configurations. In particular, debug info is necessary for many
profilers to do anything useful, making RELWITHDEBINFO important here.

MINSIZEREL was added for completeness' sake.
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")

set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /GL")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are better ways to do this rather than spamming this out I'm all ears :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have no idea.. i haven't built with MSVC in a looong time.

maybe @anton-dirac knows

@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.462% when pulling 09edc48 on BillyONeal:master into 354b14d on google:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.462% when pulling 24f710d on BillyONeal:master into 354b14d on google:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.462% when pulling f03ce66 on BillyONeal:master into 354b14d on google:master.

MSVC++ before 2015 Update 2 has a bug in sleep_for where it tries to
implicitly += the input with a nanoseconds variable. Work around this by
using nanoseconds directly (which can be implicitly +='d with
chrono::nanoseconds).
@BillyONeal BillyONeal closed this May 11, 2016
@BillyONeal
Copy link
Contributor Author

Sorry, I messed this up somehow. Please ignore for now.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.462% when pulling 6f8a974 on BillyONeal:master into 354b14d on google:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants