mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-22 01:47:45 +01:00
cmake: add option for pollyhedral optimization.
This commit is contained in:
parent
d57b3fade7
commit
30c1a9fb57
@ -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…
Reference in New Issue
Block a user