diff options
| author | bunnei <bunneidev@gmail.com> | 2015-08-15 18:26:12 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2015-08-15 18:26:12 -0400 |
| commit | d852c4ecc71f800b552978362947a5eb5a524694 (patch) | |
| tree | 9ea9a86da4027126914e69b12c24d2849fdb2c2d /CMakeLists.txt | |
| parent | cebf245504b75469f19d3cc0a6f2f66aefa66947 (diff) | |
| parent | db97090cad236eeeb0909eb1d35cbece15e1f0a5 (diff) | |
Merge pull request #1002 from bunnei/shader-jit
Vertex Shader JIT for X86-64
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a02b85da3..00d71dbdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,9 +10,21 @@ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit) DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks) endif() +# Platform-agnostic definition to check if we are on x86_64 +if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "[xX]86_64" OR + ${CMAKE_SYSTEM_PROCESSOR} MATCHES "[aA][mM][dD]64") + set(ARCHITECTURE_x86_64 1) + add_definitions(-DARCHITECTURE_x86_64=1) +endif() + if (NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes -pthread") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") + + if (ARCHITECTURE_x86_64) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1") + endif() else() # Silence "deprecation" warnings add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE) |
