Toolchain_scriptonly_common.cmake 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. # Make sure that the try compile step doesn't try to run the application it builds
  15. set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
  16. list(APPEND CMAKE_C_COMPILE_FEATURES
  17. c_std_90
  18. c_std_99
  19. c_std_11
  20. c_std_17
  21. c_function_prototypes
  22. c_restrict
  23. c_static_assert
  24. c_variadic_macros
  25. )
  26. list(APPEND CMAKE_CXX_COMPILE_FEATURES
  27. cxx_std_98
  28. cxx_std_11
  29. cxx_std_14
  30. cxx_std_17
  31. #C++ 98: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-98
  32. cxx_template_template_parameters
  33. #C++ 11: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-11
  34. cxx_alias_templates
  35. cxx_alignas
  36. cxx_alignof
  37. cxx_attributes
  38. cxx_auto_type
  39. cxx_constexpr
  40. cxx_decltype_incomplete_return_types
  41. cxx_decltype
  42. cxx_default_function_template_args
  43. cxx_defaulted_functions
  44. cxx_defaulted_move_initializers
  45. cxx_delegating_constructors
  46. cxx_deleted_functions
  47. cxx_enum_forward_declarations
  48. cxx_explicit_conversions
  49. cxx_extended_friend_declarations
  50. cxx_extern_templates
  51. cxx_final
  52. cxx_func_identifier
  53. cxx_generalized_initializers
  54. cxx_inheriting_constructors
  55. cxx_inline_namespaces
  56. cxx_lambdas
  57. cxx_local_type_template_args
  58. cxx_long_long_type
  59. cxx_noexcept
  60. cxx_nonstatic_member_init
  61. cxx_nullptr
  62. cxx_override
  63. cxx_range_for
  64. cxx_raw_string_literals
  65. cxx_reference_qualified_functions
  66. cxx_right_angle_brackets
  67. cxx_rvalue_references
  68. cxx_sizeof_member
  69. cxx_static_assert
  70. cxx_strong_enums
  71. cxx_thread_local
  72. cxx_trailing_return_types
  73. cxx_unicode_literals
  74. cxx_uniform_initialization
  75. cxx_unrestricted_unions
  76. cxx_user_literals
  77. cxx_variadic_macros
  78. cxx_variadic_templates
  79. # C++ 14: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#individual-features-from-c-14
  80. cxx_aggregate_default_initializers
  81. cxx_attribute_deprecated
  82. cxx_binary_literals
  83. cxx_contextual_conversions
  84. cxx_decltype_auto
  85. cxx_digit_separators
  86. cxx_generic_lambdas
  87. cxx_lambda_init_captures
  88. cxx_relaxed_constexpr
  89. cxx_return_type_deduction
  90. cxx_variable_templates
  91. )