oneapi-src / oneapi-src/oneAPI-samples
Cannot override optimization level set for particle-diffusion sample
@JoeOster 已经在做这个了。
开始于 2021年9月21日。
- 主要语言
- C++
- 星标
- 1.2k
- 派生
- 745
- PR 合并指标
- 30 天内没有已合并 PR
描述
Summary
particle-diffusion/src/CMakeLists.txt sets default optimization level to -O3, regardless of the CMAKE_BUILD_TYPE
Version
oneAPI Base Tookit 2021.4
Environment
Ubuntu 20.04
Coffee Lake / GEN9 graphics
Steps to reproduce
from particle-diffusion sample directory run:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=DEBUG ..
Observed behavior
Running "cmake -DCMAKE_BUILD_TYPE=DEBUG .." results in both -O0 and -O3 specified in flags.make:
CMakeFiles/motionsim.exe.dir/flags.make:CXX_FLAGS = -g -O0 -O3 -std=c++17 -g
As the result, dpcpp seem to performs -O3 optimization, defeating the purpose of DEBUG build
Expected behavior
cmake uses -O0 -g compiler flags when CMAKE_BUILD_TYPE=DEBUG is set
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。