mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
9e66397c28
Add entries in Modules and Modules/Platform to support Objective-C++ compiler determination and identification. Add Modules to check Objective-C++ compiler flags, source compilations, program checks, etc... Use OBJCXX as the designator of the language, eg: project(foo OBJCXX) Add various tests for Objective-C++ language features. Add tests to preserve C++ handling of .M and .mm files when Objective-C++ is not a configured language. Co-authored-by: Cristian Adam <cristian.adam@gmail.com>
80 lines
3.4 KiB
CMake
80 lines
3.4 KiB
CMake
set(CMAKE_OBJCXX_COMPILER "@CMAKE_OBJCXX_COMPILER@")
|
|
set(CMAKE_OBJCXX_COMPILER_ARG1 "@CMAKE_OBJCXX_COMPILER_ARG1@")
|
|
set(CMAKE_OBJCXX_COMPILER_ID "@CMAKE_OBJCXX_COMPILER_ID@")
|
|
set(CMAKE_OBJCXX_COMPILER_VERSION "@CMAKE_OBJCXX_COMPILER_VERSION@")
|
|
set(CMAKE_OBJCXX_COMPILER_VERSION_INTERNAL "@CMAKE_OBJCXX_COMPILER_VERSION_INTERNAL@")
|
|
set(CMAKE_OBJCXX_COMPILER_WRAPPER "@CMAKE_OBJCXX_COMPILER_WRAPPER@")
|
|
set(CMAKE_OBJCXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_OBJCXX_STANDARD_COMPUTED_DEFAULT@")
|
|
set(CMAKE_OBJCXX_COMPILE_FEATURES "@CMAKE_OBJCXX_COMPILE_FEATURES@")
|
|
set(CMAKE_OBJCXX98_COMPILE_FEATURES "@CMAKE_OBJCXX98_COMPILE_FEATURES@")
|
|
set(CMAKE_OBJCXX11_COMPILE_FEATURES "@CMAKE_OBJCXX11_COMPILE_FEATURES@")
|
|
set(CMAKE_OBJCXX14_COMPILE_FEATURES "@CMAKE_OBJCXX14_COMPILE_FEATURES@")
|
|
set(CMAKE_OBJCXX17_COMPILE_FEATURES "@CMAKE_OBJCXX17_COMPILE_FEATURES@")
|
|
set(CMAKE_OBJCXX20_COMPILE_FEATURES "@CMAKE_OBJCXX20_COMPILE_FEATURES@")
|
|
|
|
set(CMAKE_OBJCXX_PLATFORM_ID "@CMAKE_OBJCXX_PLATFORM_ID@")
|
|
set(CMAKE_OBJCXX_SIMULATE_ID "@CMAKE_OBJCXX_SIMULATE_ID@")
|
|
set(CMAKE_OBJCXX_COMPILER_FRONTEND_VARIANT "@CMAKE_OBJCXX_COMPILER_FRONTEND_VARIANT@")
|
|
set(CMAKE_OBJCXX_SIMULATE_VERSION "@CMAKE_OBJCXX_SIMULATE_VERSION@")
|
|
@_SET_CMAKE_OBJCXX_COMPILER_ARCHITECTURE_ID@
|
|
@SET_CMAKE_XCODE_ARCHS@
|
|
set(CMAKE_AR "@CMAKE_AR@")
|
|
set(CMAKE_OBJCXX_COMPILER_AR "@CMAKE_OBJCXX_COMPILER_AR@")
|
|
set(CMAKE_RANLIB "@CMAKE_RANLIB@")
|
|
set(CMAKE_OBJCXX_COMPILER_RANLIB "@CMAKE_OBJCXX_COMPILER_RANLIB@")
|
|
set(CMAKE_LINKER "@CMAKE_LINKER@")
|
|
set(CMAKE_MT "@CMAKE_MT@")
|
|
set(CMAKE_COMPILER_IS_GNUOBJCXX @CMAKE_COMPILER_IS_GNUOBJCXX@)
|
|
set(CMAKE_OBJCXX_COMPILER_LOADED 1)
|
|
set(CMAKE_OBJCXX_COMPILER_WORKS @CMAKE_OBJCXX_COMPILER_WORKS@)
|
|
set(CMAKE_OBJCXX_ABI_COMPILED @CMAKE_OBJCXX_ABI_COMPILED@)
|
|
|
|
set(CMAKE_OBJCXX_COMPILER_ENV_VAR "OBJCXX")
|
|
|
|
set(CMAKE_OBJCXX_COMPILER_ID_RUN 1)
|
|
set(CMAKE_OBJCXX_SOURCE_FILE_EXTENSIONS M;m;mm)
|
|
set(CMAKE_OBJCXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O)
|
|
|
|
if (CMAKE_OBJC_COMPILER_ID_RUN)
|
|
foreach(extension IN LISTS CMAKE_OBJC_SOURCE_FILE_EXTENSIONS)
|
|
list(REMOVE_ITEM CMAKE_OBJCXX_SOURCE_FILE_EXTENSIONS ${extension})
|
|
endforeach()
|
|
endif()
|
|
|
|
foreach (lang C CXX OBJC)
|
|
foreach(extension IN LISTS CMAKE_OBJCXX_SOURCE_FILE_EXTENSIONS)
|
|
if (CMAKE_${lang}_COMPILER_ID_RUN)
|
|
list(REMOVE_ITEM CMAKE_${lang}_SOURCE_FILE_EXTENSIONS ${extension})
|
|
endif()
|
|
endforeach()
|
|
endforeach()
|
|
|
|
set(CMAKE_OBJCXX_LINKER_PREFERENCE 25)
|
|
set(CMAKE_OBJCXX_LINKER_PREFERENCE_PROPAGATES 1)
|
|
|
|
# Save compiler ABI information.
|
|
set(CMAKE_OBJCXX_SIZEOF_DATA_PTR "@CMAKE_OBJCXX_SIZEOF_DATA_PTR@")
|
|
set(CMAKE_OBJCXX_COMPILER_ABI "@CMAKE_OBJCXX_COMPILER_ABI@")
|
|
set(CMAKE_OBJCXX_LIBRARY_ARCHITECTURE "@CMAKE_OBJCXX_LIBRARY_ARCHITECTURE@")
|
|
|
|
if(CMAKE_OBJCXX_SIZEOF_DATA_PTR)
|
|
set(CMAKE_SIZEOF_VOID_P "${CMAKE_OBJCXX_SIZEOF_DATA_PTR}")
|
|
endif()
|
|
|
|
if(CMAKE_OBJCXX_COMPILER_ABI)
|
|
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_OBJCXX_COMPILER_ABI}")
|
|
endif()
|
|
|
|
if(CMAKE_OBJCXX_LIBRARY_ARCHITECTURE)
|
|
set(CMAKE_LIBRARY_ARCHITECTURE "@CMAKE_OBJCXX_LIBRARY_ARCHITECTURE@")
|
|
endif()
|
|
|
|
@CMAKE_OBJCXX_COMPILER_CUSTOM_CODE@
|
|
@CMAKE_OBJCXX_SYSROOT_FLAG_CODE@
|
|
@CMAKE_OBJCXX_OSX_DEPLOYMENT_TARGET_FLAG_CODE@
|
|
|
|
set(CMAKE_OBJCXX_IMPLICIT_INCLUDE_DIRECTORIES "@CMAKE_OBJCXX_IMPLICIT_INCLUDE_DIRECTORIES@")
|
|
set(CMAKE_OBJCXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_OBJCXX_IMPLICIT_LINK_LIBRARIES@")
|
|
set(CMAKE_OBJCXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_OBJCXX_IMPLICIT_LINK_DIRECTORIES@")
|
|
set(CMAKE_OBJCXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "@CMAKE_OBJCXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES@")
|