mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
CMake Build: Tidy up when -msse2 is passed to gcc (#622)
* Define CMAKE_ARM_COMPILER automatically (#469) Makes use of CMAKE_SYSTEM_PROCESSOR to detect whether compilation is happening for an ARM architecture. * Use the correct guard for specifying msse2 compiler flags. Bruteforce and conversions were only checking against ANDROID which was not sufficient for ARM Linux builds. * Remove redundant uses of the msse2 compiler flag. * Globally set -msse2 for x86/amd64 gcc, Apple and Clang builds. This is a change in behaviour. Prior to this commit, msse2 was only set for bruteforce and conversions. msse and mfpmath=sse were already set globally prior to this change.
This commit is contained in:
@@ -15,11 +15,6 @@ set (SPIR_SOURCES
|
||||
add_executable(${SPIR_OUT}
|
||||
${SPIR_SOURCES})
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC)
|
||||
set_source_files_properties(
|
||||
COMPILE_FLAGS -msse2)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
set_target_properties(${SPIR_OUT} PROPERTIES
|
||||
COMPILE_FLAGS "-fexceptions -frtti")
|
||||
@@ -69,4 +64,3 @@ foreach(input_file ${SPIR_FILES})
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${input_file}" "$<TARGET_FILE_DIR:${SPIR_OUT}>/"
|
||||
)
|
||||
endforeach(input_file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user