fixed warnings
This commit is contained in:
@@ -15,11 +15,20 @@ if(POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
endif()
|
||||
|
||||
|
||||
## -------------------------------------------------------------------------- ##
|
||||
|
||||
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.
|
||||
option(USE_CUDA "Enable CUDA support" OFF)
|
||||
if(USE_CUDA)
|
||||
|
||||
Reference in New Issue
Block a user