Toolchain_scriptonly_common.cmake 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. #
  8. # Explicitly setting CMAKE_SYSTEM_NAME forces CMake to use cross compiling mode
  9. # Even if it is set to the current platform. See the CMAKE_CROSSCOMPILING var documentation
  10. # https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html#cmake-crosscompiling
  11. set(CMAKE_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_NAME})
  12. set(CMAKE_C_COMPILER_WORKS 1)
  13. set(CMAKE_CXX_COMPILER_WORKS 1)
  14. set(CMAKE_C_COMPILER_FORCED TRUE)
  15. set(CMAKE_CXX_COMPILER_FORCED TRUE)
  16. # Make sure that the try compile step doesn't try to run the application it builds
  17. set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
  18. list(APPEND CMAKE_C_COMPILE_FEATURES
  19. c_std_90
  20. c_std_99
  21. c_std_11
  22. c_std_17
  23. c_function_prototypes
  24. c_restrict
  25. c_static_assert
  26. c_variadic_macros
  27. )
  28. list(APPEND CMAKE_CXX_COMPILE_FEATURES
  29. cxx_std_98
  30. cxx_std_11
  31. cxx_std_14
  32. cxx_std_17
  33. #C++ 98: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-98
  34. cxx_template_template_parameters
  35. #C++ 11: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-11
  36. cxx_alias_templates
  37. cxx_alignas
  38. cxx_alignof
  39. cxx_attributes
  40. cxx_auto_type
  41. cxx_constexpr
  42. cxx_decltype_incomplete_return_types
  43. cxx_decltype
  44. cxx_default_function_template_args
  45. cxx_defaulted_functions
  46. cxx_defaulted_move_initializers
  47. cxx_delegating_constructors
  48. cxx_deleted_functions
  49. cxx_enum_forward_declarations
  50. cxx_explicit_conversions
  51. cxx_extended_friend_declarations
  52. cxx_extern_templates
  53. cxx_final
  54. cxx_func_identifier
  55. cxx_generalized_initializers
  56. cxx_inheriting_constructors
  57. cxx_inline_namespaces
  58. cxx_lambdas
  59. cxx_local_type_template_args
  60. cxx_long_long_type
  61. cxx_noexcept
  62. cxx_nonstatic_member_init
  63. cxx_nullptr
  64. cxx_override
  65. cxx_range_for
  66. cxx_raw_string_literals
  67. cxx_reference_qualified_functions
  68. cxx_right_angle_brackets
  69. cxx_rvalue_references
  70. cxx_sizeof_member
  71. cxx_static_assert
  72. cxx_strong_enums
  73. cxx_thread_local
  74. cxx_trailing_return_types
  75. cxx_unicode_literals
  76. cxx_uniform_initialization
  77. cxx_unrestricted_unions
  78. cxx_user_literals
  79. cxx_variadic_macros
  80. cxx_variadic_templates
  81. # C++ 14: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-14
  82. cxx_aggregate_default_initializers
  83. cxx_attribute_deprecated
  84. cxx_binary_literals
  85. cxx_contextual_conversions
  86. cxx_decltype_auto
  87. cxx_digit_separators
  88. cxx_generic_lambdas
  89. cxx_lambda_init_captures
  90. cxx_relaxed_constexpr
  91. cxx_return_type_deduction
  92. cxx_variable_templates
  93. )