mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
* Preserve existing release flags in MSVC Without this the `/MD` flag is lost on Release builds, resulting in the below error when using a Ninja CMake generator with VS2019 compiler. Before replacement `/MD /O2 /Ob2 /DNDEBUG`, after replace `/MD /Od /Ob0 /DNDEBUG` ``` harness.lib(testHarness.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in test_conversions.cpp.obj ``` * Remove Visual Studio 2005 release flag workarounds
20 lines
581 B
CMake
20 lines
581 B
CMake
set(MODULE_NAME CONVERSIONS)
|
|
|
|
set (${MODULE_NAME}_SOURCES
|
|
Sleep.cpp test_conversions.cpp basic_test_conversions.cpp
|
|
)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX AND "${CLConform_TARGET_ARCH}" STREQUAL "ARM")
|
|
list(APPEND ${MODULE_NAME}_SOURCES fplib.cpp)
|
|
endif()
|
|
|
|
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)
|