oneapi-src / oneapi-src/oneAPI-samples

Cannot override optimization level set for particle-diffusion sample

Đang mở
#670 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

@JoeOster đang làm issue này rồi.

Từ ngày 21/9/2021.

bug
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

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.