fixed warnings
This commit is contained in:
@@ -15,11 +15,20 @@ if(POLICY CMP0167)
|
|||||||
cmake_policy(SET CMP0167 NEW)
|
cmake_policy(SET CMP0167 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
## -------------------------------------------------------------------------- ##
|
## -------------------------------------------------------------------------- ##
|
||||||
|
|
||||||
project(uLib)
|
project(uLib)
|
||||||
|
|
||||||
|
# Remove GCC-only flag injected by conda's CFLAGS/CXXFLAGS that clang doesn't support.
|
||||||
|
# Must run after project() since that's when CMake initialises CMAKE_<LANG>_FLAGS from env.
|
||||||
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
|
foreach(_lang C CXX)
|
||||||
|
foreach(_var CMAKE_${_lang}_FLAGS CMAKE_${_lang}_FLAGS_RELEASE CMAKE_${_lang}_FLAGS_RELWITHDEBINFO CMAKE_${_lang}_FLAGS_DEBUG)
|
||||||
|
string(REPLACE "-fno-merge-constants" "" ${_var} "${${_var}}")
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
# CUDA Toolkit seems to be missing locally. Toggle ON if nvcc is made available.
|
# CUDA Toolkit seems to be missing locally. Toggle ON if nvcc is made available.
|
||||||
option(USE_CUDA "Enable CUDA support" OFF)
|
option(USE_CUDA "Enable CUDA support" OFF)
|
||||||
if(USE_CUDA)
|
if(USE_CUDA)
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -65,6 +65,18 @@ cmake --preset conan-release
|
|||||||
cmake --build build -j$(nproc)
|
cmake --build build -j$(nproc)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
5. **Clean build (wipe and rebuild everything):**
|
||||||
|
```bash
|
||||||
|
cmake --build build --clean-first -j$(nproc)
|
||||||
|
```
|
||||||
|
|
||||||
|
6. **Run tests:**
|
||||||
|
```bash
|
||||||
|
cmake --build build --target test -j$(nproc)
|
||||||
|
# or equivalently:
|
||||||
|
ctest --test-dir build --output-on-failure -j$(nproc)
|
||||||
|
```
|
||||||
|
|
||||||
#### LLVM/Clang build (clang + lld + ccache — fastest)
|
#### LLVM/Clang build (clang + lld + ccache — fastest)
|
||||||
|
|
||||||
A `fast` conan profile is provided that uses **clang**, **lld** (LLVM linker), and **ccache**. Install them into your environment first:
|
A `fast` conan profile is provided that uses **clang**, **lld** (LLVM linker), and **ccache**. Install them into your environment first:
|
||||||
|
|||||||
Reference in New Issue
Block a user