提交 17297225 编写于 作者: M Matt Pharr

Disable -march=native on CUDA builds.

Issue #87.
上级 82ace326
......@@ -265,8 +265,15 @@ endif ()
INCLUDE(CheckCXXCompilerFlag)
# TODO: how to specify this on windows?
# TODO: the following works given --forward-unknown-to-host-compiler
# starting with CUDA 11.1, but is broken in 11.0. Unfortunately cmake
# still reports 0 for CUDA_VERSION_MINOR with 11.1, so it's not clear how
# to detect that vs CUDA 11.0...
check_cxx_compiler_flag ("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
if (COMPILER_SUPPORTS_MARCH_NATIVE AND PBRT_BUILD_NATIVE_EXECUTABLE)
if (COMPILER_SUPPORTS_MARCH_NATIVE AND PBRT_BUILD_NATIVE_EXECUTABLE AND
NOT PBRT_CUDA_ENABLED)
list (APPEND PBRT_CXX_FLAGS -march=native)
endif ()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册