PhysX
PhysX copied to clipboard
Fix use of deprecated function exec_program in GetCompilerAndPlatform.cmake
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.