Browse Source

cmake: add option for pollyhedral optimization.

master
Andrey Akhmichin 11 months ago
parent
commit
30c1a9fb57
  1. 9
      CMakeLists.txt

9
CMakeLists.txt

@ -46,6 +46,7 @@ option(USE_NOVGUI_SCOREBOARD "Prefer non-VGUI Scoreboard when USE_VGUI is enable
option(USE_VOICEMGR "Enable VOICE MANAGER." OFF) option(USE_VOICEMGR "Enable VOICE MANAGER." OFF)
option(BUILD_CLIENT "Build client dll" ON) option(BUILD_CLIENT "Build client dll" ON)
option(BUILD_SERVER "Build server dll" ON) option(BUILD_SERVER "Build server dll" ON)
option(POLLY "Enable pollyhedral optimization" OFF)
if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR
((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") ((WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
@ -177,3 +178,11 @@ endif()
if(NOT BUILD_SERVER AND NOT BUILD_CLIENT) if(NOT BUILD_SERVER AND NOT BUILD_CLIENT)
message(FATAL_ERROR "Nothing to build") message(FATAL_ERROR "Nothing to build")
endif() endif()
if(POLLY)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-mllvm -polly)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-fgraphite-identity -floop-interchange -floop-block)
endif()
endif()

Loading…
Cancel
Save