Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Comments

Fix configure failure using older cmake than 3.25#495

Merged
theHamsta merged 1 commit intoNVIDIA:masterfrom
kumattau:try_compile
Jun 16, 2023
Merged

Fix configure failure using older cmake than 3.25#495
theHamsta merged 1 commit intoNVIDIA:masterfrom
kumattau:try_compile

Conversation

@kumattau
Copy link
Contributor

@kumattau kumattau commented Jun 15, 2023

This pull request is that try_compile can support older cmake than 3.25.

The syntax of try_compile without <bindir> requires newer cmake than 3.25, but this project allows cmake 3.21 or later, so versions is inconsistent.

In venv with include-system-site-packages=true and older cmake whl than 3.25 in the system, the following error occurs.
For example, I faced this error when using venv with include-system-site-packages=true in nvcr.io/nvidia/pytorch:23.05-py3 ngc container.

$ pip3 install git+https://github.com/NVIDIA/VideoProcessingFramework
...
      CMake Error: The source directory "SOURCES/CMakeFiles/CMakeTmp" does not exist.
      Specify --help for usage, or press the help button on the CMake GUI.
      CMake Error at src/TC/CMakeLists.txt:144 (try_compile):
        Failed to configure test project build system.

Copy link
Collaborator

@theHamsta theHamsta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

An alternative to try_compile would maybe be to use __has_include https://en.cppreference.com/w/cpp/preprocessor/include directly in the source file

@theHamsta theHamsta merged commit 9c54973 into NVIDIA:master Jun 16, 2023
@kumattau kumattau deleted the try_compile branch June 16, 2023 10:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants