Add URDE_VECTOR_ISA=native, update README.md with CMake options

This commit is contained in:
Luke Street 2019-11-30 23:37:47 -05:00
parent 9c8960cf5f
commit 33990a9691
2 changed files with 10 additions and 2 deletions

View File

@ -104,7 +104,10 @@ else()
#add_compile_definitions(_GLIBCXX_DEBUG=1) #add_compile_definitions(_GLIBCXX_DEBUG=1)
endif() endif()
if(${URDE_VECTOR_ISA} STREQUAL "avx2") if(${URDE_VECTOR_ISA} STREQUAL "native")
add_compile_options(-march=native)
message(STATUS "Building with native ISA")
elseif(${URDE_VECTOR_ISA} STREQUAL "avx2")
add_compile_options(-mavx2) add_compile_options(-mavx2)
message(STATUS "Building with AVX2 Vector ISA") message(STATUS "Building with AVX2 Vector ISA")
elseif(${URDE_VECTOR_ISA} STREQUAL "avx") elseif(${URDE_VECTOR_ISA} STREQUAL "avx")

View File

@ -41,9 +41,14 @@ cd urde-build
```sh ```sh
cmake -DCMAKE_BUILD_TYPE=Debug ../urde cmake -DCMAKE_BUILD_TYPE=Debug ../urde
make make -j$(nproc)
``` ```
CMake options:
- Build release optimized (better runtime performance): `-DCMAKE_BUILD_TYPE=Release`
- Use clang+lld (faster linking): `-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++`
- Optimize for current CPU (resulting binaries are not portable): `-DURDE_VECTOR_ISA=native`
#### Qt Creator #### Qt Creator
*(main development / debugging IDE)* *(main development / debugging IDE)*