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

Readme's cmake command wont build samples or tests #1674

Closed
tom-huntington opened this issue Oct 5, 2023 · 5 comments · May be fixed by #1686
Closed

Readme's cmake command wont build samples or tests #1674

tom-huntington opened this issue Oct 5, 2023 · 5 comments · May be fixed by #1686

Comments

@tom-huntington
Copy link
Contributor

cmake -DSAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DSAMPLES_BUILD=ON -DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON -DTESTS_BUILD=ON -B build

It generates a Makefile for VideoHppGenerator and VulkanHppGenerator but not the samples and tests.

cmake version 3.16.3

@theHamsta
Copy link
Contributor

theHamsta commented Oct 5, 2023

It has to be

cmake  -DVULKAN_HPP_SAMPLES_BUILD=ON \
              -DVULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
              -DVULKAN_HPP_TESTS_BUILD=ON \
              -B build
cmake --build build --parallel

as in CI https://github.com/theHamsta/Vulkan-Hpp/blob/e2989c4da3c3f892a15e3d54b77816198ac653c4/.github/workflows/ci-ubuntu.yml#L38-L49

Do you want to create a PR to fix the problem?

@tom-huntington
Copy link
Contributor Author

I'm getting a error still

$ cmake  -DVULKAN_HPP_SAMPLES_BUILD=ON \
∙               -DVULKAN_HPP_SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
∙               -DVULKAN_HPP_TESTS_BUILD=ON \
∙               -B build
--  Found clang-format version <10.0.0>.
--  Using .clang-format version 7.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Using X11 for window creation
-- No build type selected, default to Debug
-- Google Mock was not found - tests based on that will not build
-- spirv-tools not linked - illegal SPIRV may be generated for HLSL
CMake Error at CMakeLists.txt:118 (add_library):
  add_library INTERFACE library requires no source arguments.
Call Stack (most recent call first):
  RAII_Samples/utils/CMakeLists.txt:15 (vulkan_hpp__setup_library)


CMake Error at CMakeLists.txt:131 (set_target_properties):
  set_target_properties Can not find target to add properties to: RAII_utils
Call Stack (most recent call first):
  RAII_Samples/utils/CMakeLists.txt:15 (vulkan_hpp__setup_library)


CMake Error at RAII_Samples/utils/CMakeLists.txt:20 (target_link_libraries):
  Cannot specify link libraries for target "RAII_utils" which is not built by
  this project.


-- Configuring incomplete, errors occurred!
See also "/home/a/cloned_repos/Vulkan-Hpp/build/CMakeFiles/CMakeOutput.log".
See also "/home/a/cloned_repos/Vulkan-Hpp/build/CMakeFiles/CMakeError.log".

@asuessenbach
Copy link
Contributor

@tom-huntington It seems, older CMake versions have issues with how we encoded an interface libraries.
I've adjusted that with #1686. Would you please verify that it resolves your issue?

@theHamsta
Copy link
Contributor

A short question, are you using MacOS or Linux? The last time we had issues with how INTERFACE was handled it was on MacOS.

@tom-huntington
Copy link
Contributor Author

WSL. Sorry the error was resolved when I switched my distribution, then forgot about this.

I did get another error and hacked the cmake to fix it.

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