CMakeLists.txt 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. add_executable(shader_recompiler
  2. backend/spirv/emit_spirv.cpp
  3. backend/spirv/emit_spirv.h
  4. backend/spirv/emit_spirv_bitwise_conversion.cpp
  5. backend/spirv/emit_spirv_composite.cpp
  6. backend/spirv/emit_spirv_context_get_set.cpp
  7. backend/spirv/emit_spirv_control_flow.cpp
  8. backend/spirv/emit_spirv_floating_point.cpp
  9. backend/spirv/emit_spirv_integer.cpp
  10. backend/spirv/emit_spirv_logical.cpp
  11. backend/spirv/emit_spirv_memory.cpp
  12. backend/spirv/emit_spirv_select.cpp
  13. backend/spirv/emit_spirv_undefined.cpp
  14. environment.h
  15. exception.h
  16. file_environment.cpp
  17. file_environment.h
  18. frontend/ir/attribute.cpp
  19. frontend/ir/attribute.h
  20. frontend/ir/basic_block.cpp
  21. frontend/ir/basic_block.h
  22. frontend/ir/condition.cpp
  23. frontend/ir/condition.h
  24. frontend/ir/flow_test.cpp
  25. frontend/ir/flow_test.h
  26. frontend/ir/function.cpp
  27. frontend/ir/function.h
  28. frontend/ir/ir_emitter.cpp
  29. frontend/ir/ir_emitter.h
  30. frontend/ir/microinstruction.cpp
  31. frontend/ir/microinstruction.h
  32. frontend/ir/opcodes.cpp
  33. frontend/ir/opcodes.h
  34. frontend/ir/opcodes.inc
  35. frontend/ir/post_order.cpp
  36. frontend/ir/post_order.h
  37. frontend/ir/pred.h
  38. frontend/ir/program.cpp
  39. frontend/ir/program.h
  40. frontend/ir/reg.h
  41. frontend/ir/structured_control_flow.cpp
  42. frontend/ir/structured_control_flow.h
  43. frontend/ir/type.cpp
  44. frontend/ir/type.h
  45. frontend/ir/value.cpp
  46. frontend/ir/value.h
  47. frontend/maxwell/control_flow.cpp
  48. frontend/maxwell/control_flow.h
  49. frontend/maxwell/decode.cpp
  50. frontend/maxwell/decode.h
  51. frontend/maxwell/instruction.h
  52. frontend/maxwell/location.h
  53. frontend/maxwell/maxwell.inc
  54. frontend/maxwell/opcodes.cpp
  55. frontend/maxwell/opcodes.h
  56. frontend/maxwell/program.cpp
  57. frontend/maxwell/program.h
  58. frontend/maxwell/translate/impl/common_encoding.h
  59. frontend/maxwell/translate/impl/floating_point_add.cpp
  60. frontend/maxwell/translate/impl/floating_point_conversion_integer.cpp
  61. frontend/maxwell/translate/impl/floating_point_fused_multiply_add.cpp
  62. frontend/maxwell/translate/impl/floating_point_multi_function.cpp
  63. frontend/maxwell/translate/impl/floating_point_multiply.cpp
  64. frontend/maxwell/translate/impl/impl.cpp
  65. frontend/maxwell/translate/impl/impl.h
  66. frontend/maxwell/translate/impl/integer_add.cpp
  67. frontend/maxwell/translate/impl/integer_scaled_add.cpp
  68. frontend/maxwell/translate/impl/integer_set_predicate.cpp
  69. frontend/maxwell/translate/impl/integer_shift_left.cpp
  70. frontend/maxwell/translate/impl/integer_short_multiply_add.cpp
  71. frontend/maxwell/translate/impl/load_store_attribute.cpp
  72. frontend/maxwell/translate/impl/load_store_memory.cpp
  73. frontend/maxwell/translate/impl/not_implemented.cpp
  74. frontend/maxwell/translate/impl/move_register.cpp
  75. frontend/maxwell/translate/impl/move_special_register.cpp
  76. frontend/maxwell/translate/translate.cpp
  77. frontend/maxwell/translate/translate.h
  78. ir_opt/constant_propagation_pass.cpp
  79. ir_opt/dead_code_elimination_pass.cpp
  80. ir_opt/global_memory_to_storage_buffer_pass.cpp
  81. ir_opt/identity_removal_pass.cpp
  82. ir_opt/passes.h
  83. ir_opt/ssa_rewrite_pass.cpp
  84. ir_opt/verification_pass.cpp
  85. main.cpp
  86. object_pool.h
  87. )
  88. target_include_directories(video_core PRIVATE sirit)
  89. target_link_libraries(shader_recompiler PRIVATE fmt::fmt sirit)
  90. if (MSVC)
  91. target_compile_options(shader_recompiler PRIVATE
  92. /W4
  93. /WX
  94. /we4018 # 'expression' : signed/unsigned mismatch
  95. /we4244 # 'argument' : conversion from 'type1' to 'type2', possible loss of data (floating-point)
  96. /we4245 # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
  97. /we4254 # 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
  98. /we4267 # 'var' : conversion from 'size_t' to 'type', possible loss of data
  99. /we4305 # 'context' : truncation from 'type1' to 'type2'
  100. /we4800 # Implicit conversion from 'type' to bool. Possible information loss
  101. /we4826 # Conversion from 'type1' to 'type2' is sign-extended. This may cause unexpected runtime behavior.
  102. )
  103. else()
  104. target_compile_options(shader_recompiler PRIVATE
  105. -Werror
  106. -Werror=conversion
  107. -Werror=ignored-qualifiers
  108. -Werror=implicit-fallthrough
  109. -Werror=shadow
  110. -Werror=sign-compare
  111. $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter>
  112. $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
  113. -Werror=unused-variable
  114. )
  115. endif()
  116. create_target_directory_groups(shader_recompiler)