Skip to content
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

Build cleanly without warnings #278

Closed
photon-schiesser opened this issue Mar 26, 2022 · 2 comments · Fixed by #283 or #289
Closed

Build cleanly without warnings #278

photon-schiesser opened this issue Mar 26, 2022 · 2 comments · Fixed by #283 or #289

Comments

@photon-schiesser
Copy link
Contributor

On Linux, run the following build commands:

cmake -Bbuild/
make mk_build_compute

I get the following warnings:

[ 30%] Building CXX object src/CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o
cd /home/kompute/build/src && /usr/bin/c++  -DFMT_LOCALE -I/home/kompute/src/include -I/home/kompute/single_include  -std=gnu++14 -o CMakeFiles/kompute.dir/OpAlgoDispatch.cpp.o -c /home/kompute/src/OpAlgoDispatch.cpp
/home/kompute/src/OpAlgoDispatch.cpp:2:9: warning: #pragma once in main file
    2 | #pragma once
      |         ^~~~
[ 40%] Building CXX object src/CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o
cd /home/kompute/build/src && /usr/bin/c++  -DFMT_LOCALE -I/home/kompute/src/include -I/home/kompute/single_include  -std=gnu++14 -o CMakeFiles/kompute.dir/OpMemoryBarrier.cpp.o -c /home/kompute/src/OpMemoryBarrier.cpp
/home/kompute/src/OpMemoryBarrier.cpp:2:9: warning: #pragma once in main file
    2 | #pragma once
      |         ^~~~

These two above warnings seem pretty clear. Can the offending lines be removed?

The below warning is very cryptic to me:

[ 10%] Building CXX object src/CMakeFiles/kompute.dir/Algorithm.cpp.o
cd /home/kompute/build/src && /usr/bin/c++  -DFMT_LOCALE -I/home/kompute/src/include -I/home/kompute/single_include  -std=gnu++14 -o CMakeFiles/kompute.dir/Algorithm.cpp.o -c /home/kompute/src/Algorithm.cpp
/home/kompute/src/Algorithm.cpp: In member function ‘void kp::Algorithm::createPipeline()’:
/home/kompute/src/Algorithm.cpp:308:79: warning: ‘vk::ResultValue<T>::operator T&&() && [with T = vk::Pipeline]’ is deprecated: Implicit-cast operators on vk::ResultValue are deprecated. Explicitly access the value as member of ResultValue. [-Wdeprecated-declarations]
  308 |       this->mDevice->createComputePipeline(*this->mPipelineCache, pipelineInfo);
      |                                                                               ^
In file included from /home/kompute/src/include/kompute/Core.hpp:14,
                 from /home/kompute/src/include/kompute/Algorithm.hpp:4,
                 from /home/kompute/src/Algorithm.cpp:4:
/usr/include/vulkan/vulkan.hpp:6530:5: note: declared here
 6530 |     operator T &&() && VULKAN_HPP_NOEXCEPT
      |     ^~~~~~~~

@axsaucedo
Copy link
Member

Thanks for opening this issue @ScheissSchiesser 👍

@axsaucedo
Copy link
Member

Reopening as we can approach by adding set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra") on the CmakeLists.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants