oneapi-src / oneapi-src/oneAPI-samples
Cannot override optimization level set for particle-diffusion sample
@JoeOster đang làm issue này rồi.
Từ ngày 21/9/2021.
- Ngôn ngữ chính
- C++
- Star
- 1.2k
- Fork
- 745
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.