-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable profiling as the default option when using MSVC #3066
Disable profiling as the default option when using MSVC #3066
Conversation
Retest this please. |
tpls/gtest/gtest/gtest.h
Outdated
@@ -48,6 +48,8 @@ | |||
// registration from Barthelemy Dagenais' (barthelemy@prologique.com) | |||
// easyUnit framework. | |||
|
|||
#define GTEST_HAS_TR1_TUPLE 0 |
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.
Did you consider conditionally adding the definition from CMake?
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.
Yes, I'm indifferent about that.
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.
You must
- either clearly comment that you added that line and state why you did so (the commit message does not contain any useful information)
- or conditionally add a compile definition to the
kokkos_gtest
target
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 believe the right thing to do is the compile definition.
We already add -DGTEST_HAS_PTHREAD=0
kokkos/core/unit_test/CMakeLists.txt
Lines 17 to 22 in 785d19f
# WORKAROUND FOR HIPCC | |
IF(Kokkos_ENABLE_HIP) | |
TARGET_COMPILE_DEFINITIONS(kokkos_gtest PUBLIC "-DGTEST_HAS_PTHREAD=0 --amdgpu-target=gfx906") | |
ELSE() | |
TARGET_COMPILE_DEFINITIONS(kokkos_gtest PUBLIC "-DGTEST_HAS_PTHREAD=0") | |
ENDIF() |
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
cmake/kokkos_tpls.cmake
Outdated
@@ -13,7 +13,12 @@ KOKKOS_TPL_OPTION(LIBNUMA Off) | |||
KOKKOS_TPL_OPTION(MEMKIND Off) | |||
KOKKOS_TPL_OPTION(CUDA Off) | |||
KOKKOS_TPL_OPTION(LIBRT Off) | |||
KOKKOS_TPL_OPTION(LIBDL On) | |||
MESSAGE(STATUS "COMPILER ID ${CMAKE_CXX_COMPILER_ID}") | |||
IF (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") |
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.
how about if(WIN32)
? That would also catch the "we use nvcc as the compiler on windows" case
Codecov Report
@@ Coverage Diff @@
## develop #3066 +/- ##
=========================================
+ Coverage 82.6% 83.1% +0.5%
=========================================
Files 122 122
Lines 8074 8485 +411
=========================================
+ Hits 6674 7058 +384
- Misses 1400 1427 +27
Continue to review full report at Codecov.
|
Co-authored-by: Damien L-G <dalg24+github@gmail.com>
Partly following up on #2977. In particular, I also need da39c79 to compile with
clang-cl
.