https://github.com/Kitware/CMake
Revision 7fa7f55230fda5ac0135b1f4a220c15ad5983857 authored by Brad King on 18 December 2019, 10:28:27 UTC, committed by Brad King on 18 December 2019, 10:34:27 UTC
Since commit 4a9154537c (Autogen: Use cmake::IsHeader/SourceExtension
for file type detection, 2019-07-02, v3.16.0-rc1~470^2~4) we process
`.hh` files with `AUTOMOC`.  However, this change can break existing
projects that do not expect the behavior.  Revert it for now.  It can
be restored later via a policy.

Fixes: #20101
1 parent 4771c4e
Raw File
Tip revision: 7fa7f55230fda5ac0135b1f4a220c15ad5983857 authored by Brad King on 18 December 2019, 10:28:27 UTC
Autogen: Revert processing of .hh files for compatibility
Tip revision: 7fa7f55
CMakeTestCompilerCommon.cmake
# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.


function(PrintTestCompilerStatus LANG MSG)
  message(STATUS "Check for working ${LANG} compiler: ${CMAKE_${LANG}_COMPILER}${MSG}")
endfunction()

# if required set the target type if not already explicitly set
macro(__TestCompiler_setTryCompileTargetType)
  if(NOT CMAKE_TRY_COMPILE_TARGET_TYPE)
    if("${CMAKE_GENERATOR}" MATCHES "Green Hills MULTI")
      #prefer static libraries to avoid linking issues
      set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
      set(__CMAKE_TEST_COMPILER_TARGET_TYPE_RESTORE 1)
    endif()
  endif()
endmacro()

# restore the original value
# -- not necessary if __TestCompiler_setTryCompileTargetType() was used in function scope
macro(__TestCompiler_restoreTryCompileTargetType)
  if(__CMAKE_TEST_COMPILER_TARGET_TYPE_RESTORE)
    unset(CMAKE_TRY_COMPILE_TARGET_TYPE)
    unset(__CMAKE_TEST_COMPILER_TARGET_TYPE_RESTORE)
  endif()
endmacro()
back to top