Files
OpenCL-CTS/test_conformance/conversions/CMakeLists.txt
Jeremy Kemp 996c353c0e 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.
2020-02-25 08:56:54 +00:00

29 lines
778 B
CMake

set(MODULE_NAME CONVERSIONS)
# VS2005 AMD64 WAR (basic_test_conversions.cpp causes internal compiler error)
if(MSVC)
set(CMAKE_C_FLAGS_RELEASE "/Od /Ob0")
set(CMAKE_CXX_FLAGS_RELEASE "/Od /Ob0")
else(MSVC)
set(CMAKE_C_FLAGS_RELEASE "-O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O0")
endif(MSVC)
set (${MODULE_NAME}_SOURCES
Sleep.cpp test_conversions.cpp basic_test_conversions.cpp
)
if(ANDROID)
list(APPEND CONVERSIONS_SOURCES fplib.c)
endif(ANDROID)
if(NOT CMAKE_CL_64 AND NOT MSVC AND NOT ANDROID)
# -march is needed for CPU atomics, default arch on gcc is i386
# that does not support atomics.
set_source_files_properties(
${MODULE_NAME}_SOURCES
COMPILE_FLAGS -march=i686)
endif(NOT CMAKE_CL_64 AND NOT MSVC AND NOT ANDROID)
include(../CMakeCommon.txt)