mirror of
https://github.com/CNugteren/CLBlast.git
synced 2024-08-27 15:27:01 +02:00
Fixed warning CMP0054
This commit is contained in:
parent
7f5cfd92ba
commit
c240774bad
|
@ -32,40 +32,40 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH false) # Don't add the automatically deter
|
||||||
# ==================================================================================================
|
# ==================================================================================================
|
||||||
|
|
||||||
# Compiler-version check (requires at least CMake 2.8.10)
|
# Compiler-version check (requires at least CMake 2.8.10)
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
|
||||||
message(FATAL_ERROR "GCC version must be at least 4.7")
|
message(FATAL_ERROR "GCC version must be at least 4.7")
|
||||||
endif()
|
endif()
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.3)
|
||||||
message(FATAL_ERROR "Clang version must be at least 3.3")
|
message(FATAL_ERROR "Clang version must be at least 3.3")
|
||||||
endif()
|
endif()
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
||||||
message(FATAL_ERROR "AppleClang version must be at least 5.0")
|
message(FATAL_ERROR "AppleClang version must be at least 5.0")
|
||||||
endif()
|
endif()
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
|
||||||
message(FATAL_ERROR "ICC version must be at least 14.0")
|
message(FATAL_ERROR "ICC version must be at least 14.0")
|
||||||
endif()
|
endif()
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
|
||||||
message(FATAL_ERROR "MS Visual Studio version must be at least 18.0")
|
message(FATAL_ERROR "MS Visual Studio version must be at least 18.0")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# C++ compiler settings
|
# C++ compiler settings
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
set(FLAGS "/Ox")
|
set(FLAGS "/Ox")
|
||||||
set(FLAGS "${FLAGS} /wd4715")
|
set(FLAGS "${FLAGS} /wd4715")
|
||||||
else()
|
else()
|
||||||
set(FLAGS "-O3 -std=c++11")
|
set(FLAGS "-O3 -std=c++11")
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
set(FLAGS "${FLAGS} -Wall -Wno-comment -Wno-return-type -Wno-switch -Wno-missing-noreturn")
|
set(FLAGS "${FLAGS} -Wall -Wno-comment -Wno-return-type -Wno-switch -Wno-missing-noreturn")
|
||||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0)
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0)
|
||||||
set(FLAGS "${FLAGS} -Wno-attributes -Wno-unused-variable")
|
set(FLAGS "${FLAGS} -Wno-attributes -Wno-unused-variable")
|
||||||
endif()
|
endif()
|
||||||
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
set(FLAGS "${FLAGS} -Wextra -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded")
|
set(FLAGS "${FLAGS} -Wextra -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-padded")
|
||||||
set(FLAGS "${FLAGS} -Wno-missing-prototypes -Wno-float-equal -Wno-switch-enum -Wno-switch")
|
set(FLAGS "${FLAGS} -Wno-missing-prototypes -Wno-float-equal -Wno-switch-enum -Wno-switch")
|
||||||
set(FLAGS "${FLAGS} -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-noreturn")
|
set(FLAGS "${FLAGS} -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-noreturn")
|
||||||
|
@ -75,7 +75,7 @@ endif()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
|
||||||
|
|
||||||
# C compiler settings (for the sample)
|
# C compiler settings (for the sample)
|
||||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
set(CFLAGS "/Ox")
|
set(CFLAGS "/Ox")
|
||||||
else()
|
else()
|
||||||
set(CFLAGS "-O3 -std=c99")
|
set(CFLAGS "-O3 -std=c99")
|
||||||
|
@ -228,7 +228,7 @@ if(TESTS)
|
||||||
if(CLBLAS_FOUND)
|
if(CLBLAS_FOUND)
|
||||||
set(REF_INCLUDES ${REF_INCLUDES} ${CLBLAS_INCLUDE_DIRS})
|
set(REF_INCLUDES ${REF_INCLUDES} ${CLBLAS_INCLUDE_DIRS})
|
||||||
set(REF_LIBRARIES ${REF_LIBRARIES} ${CLBLAS_LIBRARIES})
|
set(REF_LIBRARIES ${REF_LIBRARIES} ${CLBLAS_LIBRARIES})
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
add_definitions(" /DCLBLAST_REF_CLBLAS")
|
add_definitions(" /DCLBLAST_REF_CLBLAS")
|
||||||
else()
|
else()
|
||||||
add_definitions(" -DCLBLAST_REF_CLBLAS")
|
add_definitions(" -DCLBLAST_REF_CLBLAS")
|
||||||
|
@ -237,7 +237,7 @@ if(TESTS)
|
||||||
if(CBLAS_FOUND)
|
if(CBLAS_FOUND)
|
||||||
set(REF_INCLUDES ${REF_INCLUDES} ${CBLAS_INCLUDE_DIRS})
|
set(REF_INCLUDES ${REF_INCLUDES} ${CBLAS_INCLUDE_DIRS})
|
||||||
set(REF_LIBRARIES ${REF_LIBRARIES} ${CBLAS_LIBRARIES})
|
set(REF_LIBRARIES ${REF_LIBRARIES} ${CBLAS_LIBRARIES})
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
add_definitions(" /DCLBLAST_REF_CBLAS")
|
add_definitions(" /DCLBLAST_REF_CBLAS")
|
||||||
else()
|
else()
|
||||||
add_definitions(" -DCLBLAST_REF_CBLAS")
|
add_definitions(" -DCLBLAST_REF_CBLAS")
|
||||||
|
|
Loading…
Reference in a new issue