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

Fix use of deprecated function exec_program in GetCompilerAndPlatform.cmake #288

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

carlossss111
Copy link

Hi, I've been developing a project and have encountered this warning:

[cmake] CMake Warning (dev) at lib/physx-5.4.0/source/compiler/cmake/modules/GetCompilerAndPlatform.cmake:29 (EXEC_PROGRAM):
[cmake]   Policy CMP0153 is not set: The exec_program command should not be called.
[cmake]   Run "cmake --help-policy CMP0153" for policy details.  Use the cmake_policy
[cmake]   command to set the policy and suppress this warning.
[cmake] 
[cmake]   Use execute_process() instead.
[cmake] Call Stack (most recent call first):
[cmake]   lib/physx-5.4.0/source/compiler/cmake/modules/GetCompilerAndPlatform.cmake:87 (CompilerDumpVersion)
[cmake]   lib/physx-5.4.0/source/compiler/cmake/modules/GetCompilerAndPlatform.cmake:120 (GetCompiler)
[cmake]   lib/physx-5.4.0/source/compiler/cmake/modules/NvidiaBuildOptions.cmake:122 (GetPlatformBinName)
[cmake]   lib/physx-5.4.0/source/compiler/cmake/CMakeLists.txt:55 (INCLUDE)
[cmake] This warning is for project developers.  Use -Wno-dev to suppress it.

exec_program has been deprecated since CMAKE 3.0 in favour of execute_process, so this commit replaces it to avoid warnings and a future error. Thanks.

@vreutskyy
Copy link
Collaborator

Hi @carlossss111. Thanks for the report. We'll 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
Development

Successfully merging this pull request may close these issues.

2 participants