From 4b2e765025e90a4ed3ab437c194cced9cd9872ae Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 26 Sep 2022 17:51:29 -0400 Subject: Drop try_run macro from CMake's own build Since commit 9199f7c627 (Disable arch-specific try_run in CMake itself, 2009-12-14, v2.8.2~567) we've abused an undocumented debugging feature to override the builtin `try_run` command in CMake's own build with a wrapper macro. However, we've also long discouraged use of this feature by other projects. The purpose of the original change is outdated and of limited use anyway, so just drop it. --- CMakeLists.txt | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index a4f533d993..2b9eb2d569 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,17 +60,6 @@ else() set(USE_LGPL "") endif() -if("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - # Disallow architecture-specific try_run. It may not run on the host. - macro(TRY_RUN) - if(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES) - message(FATAL_ERROR "TRY_RUN not allowed with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES=[${CMAKE_TRY_COMPILE_OSX_ARCHITECTURES}]") - else() - _TRY_RUN(${ARGV}) - endif() - endmacro() -endif() - # Use most-recent available language dialects with GNU and Clang if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD) include(${CMake_SOURCE_DIR}/Source/Checks/cm_c11_thread_local.cmake) -- cgit v1.2.1