From b4e39211d70f1d51ffa6b0d734c7d4971f94a161 Mon Sep 17 00:00:00 2001 From: Neil Henning Date: Thu, 11 Jan 2018 17:39:03 +0000 Subject: [PATCH] Fixup CMake to work with OpenCL 1.2 branch. --- test_conformance/CMakeLists.txt | 88 +++++-- test_conformance/allocations/CMakeLists.txt | 63 ++--- test_conformance/api/CMakeLists.txt | 120 +++++---- test_conformance/atomics/CMakeLists.txt | 59 +++-- test_conformance/basic/CMakeLists.txt | 245 +++++++++--------- test_conformance/buffers/CMakeLists.txt | 61 +++-- test_conformance/commonfns/CMakeLists.txt | 67 ++--- test_conformance/compiler/CMakeLists.txt | 94 ++++--- test_conformance/computeinfo/CMakeLists.txt | 31 ++- test_conformance/contractions/CMakeLists.txt | 59 +++-- test_conformance/conversions/CMakeLists.txt | 122 +++++---- .../device_partition/CMakeLists.txt | 33 +++ test_conformance/events/CMakeLists.txt | 84 +++--- test_conformance/geometrics/CMakeLists.txt | 65 ++--- test_conformance/gl/CMakeLists.txt | 129 ++++----- test_conformance/half/CMakeLists.txt | 39 +-- test_conformance/headers/CMakeLists.txt | 113 +++++--- .../images/clCopyImage/CMakeLists.txt | 88 ++++--- .../images/clFillImage/CMakeLists.txt | 82 +++--- .../images/clGetInfo/CMakeLists.txt | 78 +++--- .../images/clReadWriteImage/CMakeLists.txt | 80 +++--- .../kernel_image_methods/CMakeLists.txt | 80 +++--- .../images/kernel_read_write/CMakeLists.txt | 94 ++++--- .../images/samplerlessReads/CMakeLists.txt | 83 +++--- test_conformance/integer_ops/CMakeLists.txt | 128 +++++---- .../math_brute_force/CMakeLists.txt | 152 +++++------ .../mem_host_flags/CMakeLists.txt | 37 +++ .../multiple_device_context/CMakeLists.txt | 68 ++--- test_conformance/printf/CMakeLists.txt | 23 ++ test_conformance/profiling/CMakeLists.txt | 62 ++--- test_conformance/relationals/CMakeLists.txt | 74 +++--- test_conformance/select/CMakeLists.txt | 54 ++-- test_conformance/spir/CMakeLists.txt | 91 +++++++ .../thread_dimensions/CMakeLists.txt | 64 ++--- test_conformance/vec_align/CMakeLists.txt | 70 ++--- test_conformance/vec_step/CMakeLists.txt | 66 ++--- 36 files changed, 1716 insertions(+), 1230 deletions(-) create mode 100644 test_conformance/device_partition/CMakeLists.txt create mode 100644 test_conformance/mem_host_flags/CMakeLists.txt create mode 100644 test_conformance/printf/CMakeLists.txt create mode 100644 test_conformance/spir/CMakeLists.txt diff --git a/test_conformance/CMakeLists.txt b/test_conformance/CMakeLists.txt index 9f27777d..57ebea08 100644 --- a/test_conformance/CMakeLists.txt +++ b/test_conformance/CMakeLists.txt @@ -1,27 +1,61 @@ -add_subdirectory(allocations) -add_subdirectory(api) -add_subdirectory(atomics) -add_subdirectory(basic) -add_subdirectory(buffers) -add_subdirectory(commonfns) -add_subdirectory(compiler) -add_subdirectory(computeinfo) -add_subdirectory(gl) -add_subdirectory(conversions) -add_subdirectory(contractions) -add_subdirectory(events) -add_subdirectory(geometrics) -add_subdirectory(half) -add_subdirectory(headers) -add_subdirectory(headers_c99) -add_subdirectory(images) -add_subdirectory(implicit_convert) -add_subdirectory(integer_ops) -add_subdirectory(math_brute_force) -add_subdirectory(multiple_device_context) -add_subdirectory(profiling) -add_subdirectory(relationals) -add_subdirectory(select) -add_subdirectory(thread_dimensions) -add_subdirectory(vec_align) -add_subdirectory(vec_step) +if(MSVC) + # The CTS will not link on MSVC 32-bit builds. To workaround this, add the + # /LARGEADDRESSAWARE option as a linker flag. This is automatically set for + # MSVC 64-bit so it does no harm to enable it on all MSVC builds. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") +else() + # Allowing the compiler to contract floating-point math causes wrong results + # to be output from the reference math of bruteforce tests, and for the + # host rounding code in conversions and image_streams tests. + set(CTS_EXTRA_FLAGS "-ffp-contract=off") + + if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)") + # We set '-mfpmath=sse' because it is the default on the x86-64 compiler, + # and we want consistent results for x86 code too. + # We set '-msse2' as most (but not all) of the sub CMakeLists.txt we include + # set it, so setting it here once means we have consistent compiliation + # flags across the entire conformance_test_* executables. + set(CTS_EXTRA_FLAGS "${CTS_EXTRA_FLAGS} -mfpmath=sse -msse2") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(ARM)|(ARM64)") + # The OpenCL CTS assumes that the char type is signed, which is not the + # default on ARM compilers, so we need to set it. + set(CTS_EXTRA_FLAGS "${CTS_EXTRA_FLAGS} -fsigned-char") + endif() + + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CTS_EXTRA_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CTS_EXTRA_FLAGS}") +endif() + +add_subdirectory(allocations) +add_subdirectory(api) +add_subdirectory(atomics) +add_subdirectory(basic) +add_subdirectory(buffers) +add_subdirectory(commonfns) +add_subdirectory(compiler) +add_subdirectory(computeinfo) +add_subdirectory(contractions) +add_subdirectory(conversions) +add_subdirectory(device_partition) +add_subdirectory(events) +add_subdirectory(geometrics) +if(GL_IS_SUPPORTED) + add_subdirectory(gl) +endif(GL_IS_SUPPORTED) +add_subdirectory(half) +add_subdirectory(headers) +add_subdirectory(images) +add_subdirectory(integer_ops) +add_subdirectory(math_brute_force) +add_subdirectory(mem_host_flags) +add_subdirectory(multiple_device_context) +add_subdirectory(printf) +add_subdirectory(profiling) +add_subdirectory(relationals) +add_subdirectory(select) +add_subdirectory(thread_dimensions) +add_subdirectory(vec_align) +add_subdirectory(vec_step) + +# Add any extension folders +add_subdirectory(spir) diff --git a/test_conformance/allocations/CMakeLists.txt b/test_conformance/allocations/CMakeLists.txt index e77eee3b..e36ad87d 100644 --- a/test_conformance/allocations/CMakeLists.txt +++ b/test_conformance/allocations/CMakeLists.txt @@ -1,30 +1,33 @@ -add_executable(conformance_test_allocations - main.cpp - allocation_execute.cpp - allocation_fill.cpp - allocation_functions.cpp - allocation_utils.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c) - -set_source_files_properties( - main.cpp - allocation_execute.cpp - allocation_fill.cpp - allocation_functions.cpp - allocation_utils.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_allocations - ${CLConform_LIBRARIES}) +add_executable(conformance_test_allocations + main.cpp + allocation_execute.cpp + allocation_fill.cpp + allocation_functions.cpp + allocation_utils.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c) + +set_source_files_properties( + main.cpp + allocation_execute.cpp + allocation_fill.cpp + allocation_functions.cpp + allocation_utils.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_allocations + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_allocations + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/api/CMakeLists.txt b/test_conformance/api/CMakeLists.txt index d6a4bf9c..e3eabb0a 100644 --- a/test_conformance/api/CMakeLists.txt +++ b/test_conformance/api/CMakeLists.txt @@ -1,51 +1,69 @@ -add_executable(conformance_test_api - main.c - test_bool.c - test_retain.cpp - test_retain_program.c - test_queries.cpp - test_create_kernels.c - test_kernels.c - test_api_min_max.c - test_kernel_arg_changes.cpp - test_kernel_arg_multi_setup.cpp - test_binary.cpp - test_native_kernel.cpp - test_mem_objects.cpp - test_create_context_from_type.cpp - test_device_min_data_type_align_size_alignment.cpp - test_platform.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/conversions.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - test_bool.c - test_retain.cpp - test_retain_program.c - test_create_kernels.c - test_kernels.c - test_api_min_max.c - test_native_kernel.cpp - test_mem_objects.cpp - test_create_context_from_type.cpp - test_device_min_data_type_align_size_alignment.cpp - test_platform.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/conversions.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_api - ${CLConform_LIBRARIES}) +add_executable(conformance_test_api + main.c + test_retain_program.c + test_queries.cpp + test_create_kernels.c + test_kernels.c + test_kernel_arg_info.c + test_api_min_max.c + test_kernel_arg_changes.cpp + test_kernel_arg_multi_setup.cpp + test_binary.cpp + test_native_kernel.cpp + test_create_context_from_type.cpp + test_platform.cpp + test_retain.cpp + test_device_min_data_type_align_size_alignment.cpp + test_queue_properties.cpp + test_mem_objects.cpp + test_bool.c + test_null_buffer_arg.c + test_mem_object_info.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/imageHelpers.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/msvc9.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c +) + +set_source_files_properties( + main.c + test_retain_program.c + test_queries.cpp + test_create_kernels.c + test_kernels.c + test_kernel_arg_info.c + test_api_min_max.c + test_kernel_arg_changes.cpp + test_kernel_arg_multi_setup.cpp + test_binary.cpp + test_native_kernel.cpp + test_create_context_from_type.cpp + test_platform.cpp + test_retain.cpp + test_device_min_data_type_align_size_alignment.cpp + test_queue_properties.cpp + test_mem_objects.cpp + test_bool.c + test_null_buffer_arg.c + test_mem_object_info.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/imageHelpers.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/msvc9.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_api + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_api + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/atomics/CMakeLists.txt b/test_conformance/atomics/CMakeLists.txt index 42d60b3f..8c8146fc 100644 --- a/test_conformance/atomics/CMakeLists.txt +++ b/test_conformance/atomics/CMakeLists.txt @@ -1,28 +1,31 @@ -add_executable(conformance_test_atomics - main.c - test_atomics.cpp - test_indexed_cases.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - test_atomics.cpp - test_indexed_cases.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_atomics - ${CLConform_LIBRARIES}) +add_executable(conformance_test_atomics + main.c + test_atomics.cpp + test_indexed_cases.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c +) + +set_source_files_properties( + main.c + test_atomics.cpp + test_indexed_cases.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_atomics + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_atomics + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/basic/CMakeLists.txt b/test_conformance/basic/CMakeLists.txt index 9301d124..e1171f5f 100644 --- a/test_conformance/basic/CMakeLists.txt +++ b/test_conformance/basic/CMakeLists.txt @@ -1,121 +1,124 @@ -add_executable(conformance_test_basic - main.c - test_fpmath_float.c test_fpmath_float2.c test_fpmath_float4.c - test_intmath_int.c test_intmath_int2.c test_intmath_int4.c - test_intmath_long.c test_intmath_long2.c test_intmath_long4.c - test_hiloeo.c test_local.c test_pointercast.c - test_if.c test_loop.c - test_readimage.c test_readimage_int16.c test_readimage_fp32.c - test_readimage3d.c test_readimage3d_int16.c test_readimage3d_fp32.c - test_writeimage.c test_writeimage_int16.c test_writeimage_fp32.c - test_multireadimageonefmt.c test_multireadimagemultifmt.c - test_imagedim.c - test_vloadstore.c - test_int2float.c test_float2int.c - test_createkernelsinprogram.c - test_hostptr.c - test_explicit_s2v.cpp - test_constant.c - test_image_multipass.c - test_imagereadwrite.c test_imagereadwrite3d.c - test_image_param.c - test_imagenpot.c - test_image_r8.c - test_barrier.c - test_basic_parameter_types.c - test_arrayreadwrite.c - test_arraycopy.c - test_imagearraycopy.c - test_imagearraycopy3d.c - test_imagecopy.c - test_imagerandomcopy.c - test_arrayimagecopy.c - test_arrayimagecopy3d.c - test_imagecopy3d.c - test_enqueue_map.cpp - test_work_item_functions.cpp - test_astype.cpp - test_async_copy.cpp - test_sizeof.c - test_vector_creation.cpp - test_vec_type_hint.c - test_numeric_constants.cpp - test_constant_source.cpp - test_bufferreadwriterect.c - test_async_strided_copy.cpp - test_preprocessors.cpp - test_kernel_memory_alignment.cpp - test_global_work_offsets.cpp - test_kernel_call_kernel_function.cpp - test_local_kernel_scope.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/imageHelpers.cpp - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - test_fpmath_float.c test_fpmath_float2.c test_fpmath_float4.c - test_intmath_int.c test_intmath_int2.c test_intmath_int4.c - test_intmath_long.c test_intmath_long2.c test_intmath_long4.c - test_hiloeo.c test_local.c test_pointercast.c - test_if.c test_loop.c - test_readimage.c test_readimage_int16.c test_readimage_fp32.c - test_readimage3d.c test_readimage3d_int16.c test_readimage3d_fp32.c - test_writeimage.c test_writeimage_int16.c test_writeimage_fp32.c - test_multireadimageonefmt.c test_multireadimagemultifmt.c - test_imagedim.c - test_vloadstore.c - test_int2float.c test_float2int.c - test_createkernelsinprogram.c - test_hostptr.c - test_constant.c - test_image_multipass.c - test_imagereadwrite.c test_imagereadwrite3d.c - test_image_param.c - test_imagenpot.c - test_image_r8.c - test_barrier.c - test_basic_parameter_types.c - test_arrayreadwrite.c - test_arraycopy.c - test_imagearraycopy.c - test_imagearraycopy3d.c - test_imagecopy.c - test_imagerandomcopy.c - test_arrayimagecopy.c - test_arrayimagecopy3d.c - test_imagecopy3d.c - test_enqueue_map.cpp - test_work_item_functions.cpp - test_astype.cpp - test_async_copy.cpp - test_sizeof.c - test_vector_creation.cpp - test_vec_type_hint.c - test_constant_source.cpp - test_bufferreadwriterect.c - test_async_strided_copy.cpp - test_preprocessors.cpp - test_kernel_memory_alignment.cpp - test_global_work_offsets.cpp - test_local_kernel_scope.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/rounding_mode.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_basic - ${CLConform_LIBRARIES}) +add_executable(conformance_test_basic + main.c + test_fpmath_float.c test_fpmath_float2.c test_fpmath_float4.c + test_intmath_int.c test_intmath_int2.c test_intmath_int4.c + test_intmath_long.c test_intmath_long2.c test_intmath_long4.c + test_hiloeo.c test_local.c test_pointercast.c + test_if.c test_loop.c + test_readimage.c test_readimage_int16.c test_readimage_fp32.c + test_readimage3d.c test_readimage3d_int16.c test_readimage3d_fp32.c + test_writeimage.c test_writeimage_int16.c test_writeimage_fp32.c + test_multireadimageonefmt.c test_multireadimagemultifmt.c + test_imagedim.c + test_vloadstore.c + test_int2float.c test_float2int.c + test_createkernelsinprogram.c + test_hostptr.c + test_explicit_s2v.cpp + test_constant.c + test_image_multipass.c + test_imagereadwrite.c test_imagereadwrite3d.c + test_image_param.c + test_imagenpot.c + test_image_r8.c + test_barrier.c + test_basic_parameter_types.c + test_arrayreadwrite.c + test_arraycopy.c + test_imagearraycopy.c + test_imagearraycopy3d.c + test_imagecopy.c + test_imagerandomcopy.c + test_arrayimagecopy.c + test_arrayimagecopy3d.c + test_imagecopy3d.c + test_enqueue_map.cpp + test_work_item_functions.cpp + test_astype.cpp + test_async_copy.cpp + test_sizeof.c + test_vector_creation.cpp + test_vec_type_hint.c + test_numeric_constants.cpp + test_constant_source.cpp + test_bufferreadwriterect.c + test_async_strided_copy.cpp + test_preprocessors.cpp + test_kernel_memory_alignment.cpp + test_global_work_offsets.cpp + test_kernel_call_kernel_function.cpp + test_local_kernel_scope.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/imageHelpers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/msvc9.c +) + +set_source_files_properties( + main.c + test_fpmath_float.c test_fpmath_float2.c test_fpmath_float4.c + test_intmath_int.c test_intmath_int2.c test_intmath_int4.c + test_intmath_long.c test_intmath_long2.c test_intmath_long4.c + test_hiloeo.c test_local.c test_pointercast.c + test_if.c test_loop.c + test_readimage.c test_readimage_int16.c test_readimage_fp32.c + test_readimage3d.c test_readimage3d_int16.c test_readimage3d_fp32.c + test_writeimage.c test_writeimage_int16.c test_writeimage_fp32.c + test_multireadimageonefmt.c test_multireadimagemultifmt.c + test_imagedim.c + test_vloadstore.c + test_int2float.c test_float2int.c + test_createkernelsinprogram.c + test_hostptr.c + test_constant.c + test_image_multipass.c + test_imagereadwrite.c test_imagereadwrite3d.c + test_image_param.c + test_imagenpot.c + test_image_r8.c + test_barrier.c + test_basic_parameter_types.c + test_arrayreadwrite.c + test_arraycopy.c + test_imagearraycopy.c + test_imagearraycopy3d.c + test_imagecopy.c + test_imagerandomcopy.c + test_arrayimagecopy.c + test_arrayimagecopy3d.c + test_imagecopy3d.c + test_enqueue_map.cpp + test_work_item_functions.cpp + test_astype.cpp + test_async_copy.cpp + test_sizeof.c + test_vector_creation.cpp + test_vec_type_hint.c + test_constant_source.cpp + test_bufferreadwriterect.c + test_async_strided_copy.cpp + test_preprocessors.cpp + test_kernel_memory_alignment.cpp + test_global_work_offsets.cpp + test_local_kernel_scope.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/rounding_mode.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_basic + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_basic + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/buffers/CMakeLists.txt b/test_conformance/buffers/CMakeLists.txt index aa2f8016..4f7fb3a7 100644 --- a/test_conformance/buffers/CMakeLists.txt +++ b/test_conformance/buffers/CMakeLists.txt @@ -1,27 +1,34 @@ -add_executable(conformance_test_buffers - main.c test_buffer_copy.c test_buffer_read.c test_buffer_write.c - test_buffer_mem.c array_info.c test_buffer_map.c test_sub_buffers.cpp test_buffer_fill.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c test_buffer_copy.c test_buffer_read.c test_buffer_write.c - test_buffer_mem.c array_info.c test_buffer_map.c test_sub_buffers.cpp test_buffer_fill.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_buffers - ${CLConform_LIBRARIES}) +add_executable(conformance_test_buffers + main.c test_buffer_copy.c test_buffer_read.c test_buffer_write.c + test_buffer_mem.c array_info.c test_buffer_map.c + test_sub_buffers.cpp test_buffer_fill.c + test_buffer_migrate.c test_image_migrate.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/conversions.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/typeWrappers.cpp) + +set_source_files_properties( + main.c test_buffer_copy.c test_buffer_read.c test_buffer_write.c + test_buffer_mem.c array_info.c test_buffer_map.c + test_sub_buffers.cpp test_buffer_fill.c + test_buffer_migrate.c test_image_migrate.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/conversions.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/typeWrappers.cpp + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_buffers + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_buffers + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/commonfns/CMakeLists.txt b/test_conformance/commonfns/CMakeLists.txt index e24dc3f0..0c44159f 100644 --- a/test_conformance/commonfns/CMakeLists.txt +++ b/test_conformance/commonfns/CMakeLists.txt @@ -1,32 +1,35 @@ -add_executable(conformance_test_commonfns - main.c test_clamp.c test_degrees.c - test_max.c test_maxf.c test_min.c test_minf.c - test_mix.c test_radians.c test_step.c test_stepf.c - test_smoothstep.c test_smoothstepf.c test_sign.c - test_fmax.c test_fmin.c test_fmaxf.c test_fminf.c test_binary_fn.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c test_clamp.c test_degrees.c - test_max.c test_maxf.c test_min.c test_minf.c - test_mix.c test_radians.c test_step.c test_stepf.c - test_smoothstep.c test_smoothstepf.c test_sign.c - test_fmax.c test_fmin.c test_fmaxf.c test_fminf.c test_binary_fn.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_commonfns - ${CLConform_LIBRARIES}) +add_executable(conformance_test_commonfns + main.c test_clamp.c test_degrees.c + test_max.c test_maxf.c test_min.c test_minf.c + test_mix.c test_radians.c test_step.c test_stepf.c + test_smoothstep.c test_smoothstepf.c test_sign.c + test_fmax.c test_fmin.c test_fmaxf.c test_fminf.c test_binary_fn.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c +) + +set_source_files_properties( + main.c test_clamp.c test_degrees.c + test_max.c test_maxf.c test_min.c test_minf.c + test_mix.c test_radians.c test_step.c test_stepf.c + test_smoothstep.c test_smoothstepf.c test_sign.c + test_fmax.c test_fmin.c test_fmaxf.c test_fminf.c test_binary_fn.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_commonfns + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_commonfns + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/compiler/CMakeLists.txt b/test_conformance/compiler/CMakeLists.txt index f841b703..8d0b06ef 100644 --- a/test_conformance/compiler/CMakeLists.txt +++ b/test_conformance/compiler/CMakeLists.txt @@ -1,36 +1,58 @@ -add_executable(conformance_test_compiler - main.c - test_build_helpers.c - test_compile.c - test_async_build.c - test_build_options.cpp - test_preprocessor.c - test_compiler_defines_for_extensions.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - test_build_helpers.c - test_compile.c - test_async_build.c - test_preprocessor.c - test_compiler_defines_for_extensions.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_compiler - ${CLConform_LIBRARIES}) +add_executable(conformance_test_compiler + main.c + test_build_helpers.c + test_compile.c + test_compiler_defines_for_extensions.cpp + test_async_build.c + test_build_options.cpp + test_preprocessor.c + test_image_macro.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/conversions.c +) + +set_source_files_properties( + main.c + test_build_helpers.c + test_compile.c + test_compiler_defines_for_extensions.cpp + test_async_build.c + test_build_options.cpp + test_preprocessor.c + test_image_macro.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/conversions.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_compiler + ${CLConform_LIBRARIES}) + +# Need to copy the test include folders to sit beside the executable +add_custom_command(TARGET conformance_test_compiler POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${CMAKE_CURRENT_SOURCE_DIR}/includeTestDirectory" + "$/includeTestDirectory" + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${CMAKE_CURRENT_SOURCE_DIR}/secondIncludeTestDirectory" + "$/secondIncludeTestDirectory") + +install(TARGETS conformance_test_compiler + DESTINATION "${CLConf_OUT_DIR}") + +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/includeTestDirectory + DESTINATION "${CLConf_OUT_DIR}") + +install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/secondIncludeTestDirectory + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/computeinfo/CMakeLists.txt b/test_conformance/computeinfo/CMakeLists.txt index f2ae5413..2f7307bd 100644 --- a/test_conformance/computeinfo/CMakeLists.txt +++ b/test_conformance/computeinfo/CMakeLists.txt @@ -1,14 +1,17 @@ -add_executable(conformance_computeinfo - main.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_computeinfo - ${CLConform_LIBRARIES}) +add_executable(conformance_test_computeinfo + main.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/msvc9.c +) + +set_source_files_properties( + main.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_computeinfo + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_computeinfo + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/contractions/CMakeLists.txt b/test_conformance/contractions/CMakeLists.txt index af4eb6cc..e7a57fce 100644 --- a/test_conformance/contractions/CMakeLists.txt +++ b/test_conformance/contractions/CMakeLists.txt @@ -1,25 +1,34 @@ -add_executable(conformance_contractions - contractions.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/mingw_compat.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/kernelHelpers.c -) -set_source_files_properties( - contractions.c - COMPILE_FLAGS -msse) -if(WIN32) -set_source_files_properties( - contractions.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/mingw_compat.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/kernelHelpers.c - PROPERTIES LANGUAGE CXX) -endif(WIN32) - -TARGET_LINK_LIBRARIES(conformance_contractions - ${CLConform_LIBRARIES}) +include_directories(../../test_common/harness) + +add_executable(conformance_test_contractions + contractions.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/mingw_compat.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/kernelHelpers.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + contractions.c + COMPILE_FLAGS -msse) +endif() + +if(WIN32) +set_source_files_properties( + contractions.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/mingw_compat.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/kernelHelpers.c + PROPERTIES LANGUAGE CXX) +endif(WIN32) + +TARGET_LINK_LIBRARIES(conformance_test_contractions + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_contractions + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/conversions/CMakeLists.txt b/test_conformance/conversions/CMakeLists.txt index 32f96246..407d6391 100644 --- a/test_conformance/conversions/CMakeLists.txt +++ b/test_conformance/conversions/CMakeLists.txt @@ -1,54 +1,68 @@ -# VS2005 AMD64 WAR (basic_test_conversions.c 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) - -add_executable(conformance_test_conversions - Sleep.c test_conversions.c basic_test_conversions.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/mingw_compat.c - ../../test_common/harness/errorHelpers.c -) - -if(WIN32) -set_source_files_properties( - Sleep.c test_conversions.c basic_test_conversions.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/mingw_compat.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/errorHelpers.c - PROPERTIES LANGUAGE CXX) -endif(WIN32) - -if(NOT CMAKE_CL_64 AND NOT MSVC) -# -march is needed for CPU atomics, default arch on gcc is i386 -# that does not support atomics. -set_source_files_properties( - Sleep.c test_conversions.c basic_test_conversions.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/mingw_compat.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/errorHelpers.c - COMPILE_FLAGS -march=i686) -endif(NOT CMAKE_CL_64 AND NOT MSVC) - -set_source_files_properties( - Sleep.c test_conversions.c basic_test_conversions.c - COMPILE_FLAGS -std=c99) - - -set_source_files_properties( - Sleep.c test_conversions.c basic_test_conversions.c - COMPILE_FLAGS -msse2) - -TARGET_LINK_LIBRARIES(conformance_test_conversions - ${CLConform_LIBRARIES}) +# VS2005 AMD64 WAR (basic_test_conversions.c 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) + +include_directories(../../test_common/harness) + +add_executable(conformance_test_conversions + Sleep.c test_conversions.c basic_test_conversions.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/mingw_compat.c + ../../test_common/harness/errorHelpers.c +) + +if(WIN32) +set_source_files_properties( + Sleep.c test_conversions.c basic_test_conversions.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/mingw_compat.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/errorHelpers.c + PROPERTIES LANGUAGE CXX) +endif(WIN32) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)") +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( + Sleep.c test_conversions.c basic_test_conversions.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/mingw_compat.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/errorHelpers.c + COMPILE_FLAGS -march=i686) +endif() +endif() + +set_source_files_properties( + Sleep.c test_conversions.c basic_test_conversions.c + COMPILE_FLAGS -std=c99) + +if(NOT MSVC) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)") +set_source_files_properties( + Sleep.c test_conversions.c basic_test_conversions.c + COMPILE_FLAGS -msse2) +endif() +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) +set_source_files_properties( + Sleep.c test_conversions.c basic_test_conversions.c + COMPILE_FLAGS "/arch:IA32") +endif() + +TARGET_LINK_LIBRARIES(conformance_test_conversions + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_conversions + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/device_partition/CMakeLists.txt b/test_conformance/device_partition/CMakeLists.txt new file mode 100644 index 00000000..e7c464ba --- /dev/null +++ b/test_conformance/device_partition/CMakeLists.txt @@ -0,0 +1,33 @@ +add_executable(conformance_test_device_partition + main.c + test_device_partition.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/msvc9.c +) + +set_source_files_properties( + main.c + test_device_partition.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +target_link_libraries(conformance_test_device_partition + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_device_partition + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/events/CMakeLists.txt b/test_conformance/events/CMakeLists.txt index c7b85628..bc0375e7 100644 --- a/test_conformance/events/CMakeLists.txt +++ b/test_conformance/events/CMakeLists.txt @@ -1,37 +1,47 @@ -add_executable(conformance_test_events - main.c - test_events.cpp - test_event_dependencies.cpp - test_waitlists.cpp - test_userevents.cpp - test_callbacks.cpp - test_userevents_multithreaded.cpp - action_classes.cpp - ../../test_common/harness/genericThread.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - test_userevents.cpp - test_callbacks.cpp - test_userevents_multithreaded.cpp - action_classes.cpp - ../../test_common/harness/genericThread.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_events - ${CLConform_LIBRARIES}) +add_executable(conformance_test_events + main.c + test_events.cpp + test_event_dependencies.cpp + test_userevents.cpp + test_waitlists.cpp + test_callbacks.cpp + action_classes.cpp + test_userevents_multithreaded.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/conversions.c + ../../test_common/harness/ThreadPool.c +) + +set_source_files_properties( + main.c + test_events.cpp + test_event_dependencies.cpp + test_userevents.cpp + test_waitlists.cpp + test_callbacks.cpp + action_classes.cpp + test_userevents_multithreaded.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/conversions.c + ../../test_common/harness/ThreadPool.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_events + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_events + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/geometrics/CMakeLists.txt b/test_conformance/geometrics/CMakeLists.txt index 43fe134a..18b725ac 100644 --- a/test_conformance/geometrics/CMakeLists.txt +++ b/test_conformance/geometrics/CMakeLists.txt @@ -1,31 +1,34 @@ -# VS2005 optimization WAR for geom_length) -if(MSVC) -set(CMAKE_C_FLAGS_RELEASE "/Od /Ob0") -set(CMAKE_CXX_FLAGS_RELEASE "/Od /Ob0") -endif(MSVC) - -add_executable(conformance_test_geometrics - main.c - test_geometrics_double.cpp - test_geometrics.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_geometrics - ${CLConform_LIBRARIES}) +# VS2005 optimization WAR for geom_length) +if(MSVC) +set(CMAKE_C_FLAGS_RELEASE "/Od /Ob0") +set(CMAKE_CXX_FLAGS_RELEASE "/Od /Ob0") +endif(MSVC) + +add_executable(conformance_test_geometrics + main.c + test_geometrics_double.cpp + test_geometrics.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c +) + +set_source_files_properties( + main.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_geometrics + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_geometrics + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/gl/CMakeLists.txt b/test_conformance/gl/CMakeLists.txt index 2834dc62..a5c5d4ab 100644 --- a/test_conformance/gl/CMakeLists.txt +++ b/test_conformance/gl/CMakeLists.txt @@ -1,62 +1,67 @@ -if(WIN32) -list(APPEND CLConform_LIBRARIES glut32 opengl32 glu32 ) -else(WIN32) -list(APPEND CLConform_LIBRARIES GL glut GLEW GLU) -endif(WIN32) - -set (GL_SOURCES - main.cpp - test_buffers.cpp - test_images_2D.cpp - test_images_3D.cpp - test_renderbuffer.cpp - test_images_2D_info.cpp - test_images_3D_info.cpp - test_renderbuffer_info.cpp - test_fence_sync.cpp - helpers.cpp - ../../test_common/gl/helpers.cpp - ../../test_common/harness/genericThread.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - ) - -if (WIN32) - list (APPEND GL_SOURCES ../../test_common/gl/setup_win32.cpp) -else(WIN32) - list (APPEND GL_SOURCES ../../test_common/gl/setup_x11.cpp) -endif(WIN32) - -# Compiling GLEW along with the project if the compiler is MINGW. -# The mingw linker was giving weird errors while linking to glew32.lib generated by -# MSVC. -if(MINGW) - list (APPEND GL_SOURCES GLEW/glew.c) - set_source_files_properties( - ${GL_SOURCES} - COMPILE_FLAGS -DGLEW_STATIC) - include_directories("./GLEW/") -endif(MINGW) - -if (MSVC) - if(CMAKE_CL_64) - list(APPEND CLConform_LIBRARIES glew64) - else(CMAKE_CL_64) - list(APPEND CLConform_LIBRARIES glew32) - endif(CMAKE_CL_64) -endif(MSVC) - -add_executable(conformance_test_gl - ${GL_SOURCES} ${GLUT_SOURCES}) - -set_source_files_properties( - ${GL_SOURCES} - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_gl - ${CLConform_LIBRARIES}) +if(WIN32) +list(APPEND CLConform_LIBRARIES glut32 opengl32 glu32 ) +else(WIN32) +list(APPEND CLConform_LIBRARIES GL glut GLEW GLU) +endif(WIN32) + +set (GL_SOURCES + main.cpp + helpers.cpp + test_buffers.cpp + test_fence_sync.cpp + test_images_1D.cpp + test_images_1Darray.cpp + test_images_2Darray.cpp + test_images_2D.cpp + test_images_3D.cpp + test_images_getinfo_common.cpp + test_images_read_common.cpp + test_images_write_common.cpp + test_renderbuffer.cpp + test_renderbuffer_info.cpp + ../images/image_helpers.cpp + ../../test_common/gl/helpers.cpp + ../../test_common/harness/conversions.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/imageHelpers.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/threadTesting.c + ) + +if (WIN32) + list (APPEND GL_SOURCES ../../test_common/gl/setup_win32.cpp) +else(WIN32) + list (APPEND GL_SOURCES ../../test_common/gl/setup_x11.cpp) +endif(WIN32) + +# Compiling GLEW along with the project if the compiler is MINGW. +# The mingw linker was giving weird errors while linking to glew32.lib generated by +# MSVC. +if(MINGW) + list (APPEND GL_SOURCES GLEW/glew.c) + set_source_files_properties( + ${GL_SOURCES} + COMPILE_FLAGS -DGLEW_STATIC) + include_directories("./GLEW/") +endif(MINGW) + +if (MSVC) + if(CMAKE_CL_64) + list(APPEND CLConform_LIBRARIES glew64) + else(CMAKE_CL_64) + list(APPEND CLConform_LIBRARIES glew32) + endif(CMAKE_CL_64) +endif(MSVC) + +add_executable(conformance_test_gl + ${GL_SOURCES} ${GLUT_SOURCES}) + +set_source_files_properties( + ${GL_SOURCES} + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_gl + ${CLConform_LIBRARIES}) diff --git a/test_conformance/half/CMakeLists.txt b/test_conformance/half/CMakeLists.txt index 3d72c2b6..3e3e1692 100644 --- a/test_conformance/half/CMakeLists.txt +++ b/test_conformance/half/CMakeLists.txt @@ -1,18 +1,21 @@ -add_executable(conformance_Test_half - cl_utils.c Test_vLoadHalf.c Test_roundTrip.c - Test_vStoreHalf.c main.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/mingw_compat.c - ../../test_common/harness/errorHelpers.c -) - -if(MSVC) -set_source_files_properties( - cl_utils.c Test_vLoadHalf.c Test_roundTrip.c - Test_vStoreHalf.c main.c - ../../test_common/harness/mingw_compat.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) -endif(MSVC) -TARGET_LINK_LIBRARIES(conformance_Test_half - ${CLConform_LIBRARIES}) +add_executable(conformance_test_half + cl_utils.c Test_vLoadHalf.c Test_roundTrip.c + Test_vStoreHalf.c main.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/mingw_compat.c + ../../test_common/harness/errorHelpers.c +) + +if(MSVC) +set_source_files_properties( + cl_utils.c Test_vLoadHalf.c Test_roundTrip.c + Test_vStoreHalf.c main.c + ../../test_common/harness/mingw_compat.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) +endif(MSVC) +TARGET_LINK_LIBRARIES(conformance_test_half + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_half + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/headers/CMakeLists.txt b/test_conformance/headers/CMakeLists.txt index 945d7cd4..935493b7 100644 --- a/test_conformance/headers/CMakeLists.txt +++ b/test_conformance/headers/CMakeLists.txt @@ -1,37 +1,76 @@ -add_executable(conformance_test_headers - test_headers.c -) - -add_executable(conformance_test_cl_h - test_cl.h.c -) - -add_executable(conformance_test_cl_platform_h - test_cl_platform.h.c -) - -add_executable(conformance_test_cl_gl_h - test_cl_gl.h.c -) - -add_executable(conformance_test_opencl_h - test_opencl.h.c -) - -set(CMAKE_C_FLAGS "" ) -set(CMAKE_CXX_FLAGS "" ) - -TARGET_LINK_LIBRARIES(conformance_test_headers - ${CLConform_LIBRARIES}) - -TARGET_LINK_LIBRARIES(conformance_test_cl_h - ${CLConform_LIBRARIES}) - -TARGET_LINK_LIBRARIES(conformance_test_cl_platform_h - ${CLConform_LIBRARIES}) - -TARGET_LINK_LIBRARIES(conformance_test_cl_gl_h - ${CLConform_LIBRARIES}) - -TARGET_LINK_LIBRARIES(conformance_test_opencl_h - ${CLConform_LIBRARIES}) +add_executable(conformance_test_headers + test_headers.c +) + +add_executable(conformance_test_cl_h + test_cl.h.c +) + +add_executable(conformance_test_cl_platform_h + test_cl_platform.h.c +) + +add_executable(conformance_test_cl_gl_h + test_cl_gl.h.c +) + +add_executable(conformance_test_opencl_h + test_opencl.h.c +) + +add_executable(conformance_test_cl_h_c99 + test_cl.h.c +) + +add_executable(conformance_test_cl_platform_h_c99 + test_cl_platform.h.c +) + +add_executable(conformance_test_cl_gl_h_c99 + test_cl_gl.h.c +) + +add_executable(conformance_test_opencl_h_c99 + test_opencl.h.c +) + +set_target_properties(conformance_test_cl_h_c99 + conformance_test_cl_platform_h_c99 + conformance_test_cl_gl_h_c99 + conformance_test_opencl_h_c99 + PROPERTIES COMPILE_FLAGS "-std=c99" +) + +TARGET_LINK_LIBRARIES(conformance_test_headers + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_cl_h + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_cl_platform_h + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_cl_gl_h + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_opencl_h + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_cl_h_c99 + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_cl_platform_h_c99 + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_cl_gl_h_c99 + ${CLConform_LIBRARIES}) + +TARGET_LINK_LIBRARIES(conformance_test_opencl_h_c99 + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_headers conformance_test_cl_h + conformance_test_cl_platform_h conformance_test_cl_gl_h + conformance_test_opencl_h conformance_test_cl_h_c99 + conformance_test_cl_platform_h_c99 conformance_test_cl_gl_h_c99 + conformance_test_opencl_h_c99 + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/images/clCopyImage/CMakeLists.txt b/test_conformance/images/clCopyImage/CMakeLists.txt index 169cc7e2..4c0406c6 100644 --- a/test_conformance/images/clCopyImage/CMakeLists.txt +++ b/test_conformance/images/clCopyImage/CMakeLists.txt @@ -1,36 +1,52 @@ -add_executable(conformance_test_cl_copy_images - main.cpp - test_copy_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_copy_3D.cpp - test_copy_2D_3D.cpp - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/mt19937.c - ../../../test_common/harness/conversions.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c) - -set_source_files_properties( - main.cpp - test_copy_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_copy_3D.cpp - test_copy_2D_3D.cpp - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/conversions.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_cl_copy_images - ${CLConform_LIBRARIES}) +add_executable(conformance_test_cl_copy_images + main.cpp + test_copy_generic.cpp + test_copy_1D.cpp + test_copy_2D.cpp + ../image_helpers.cpp + test_loops.cpp + test_copy_3D.cpp + test_copy_1D_array.cpp + test_copy_2D_array.cpp + test_copy_2D_3D.cpp + test_copy_2D_2D_array.cpp + test_copy_3D_2D_array.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/typeWrappers.cpp + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c) + +set_source_files_properties( + main.cpp + test_copy_generic.cpp + test_copy_1D.cpp + test_copy_2D.cpp + ../image_helpers.cpp + test_loops.cpp + test_copy_3D.cpp + test_copy_1D_array.cpp + test_copy_2D_array.cpp + test_copy_2D_3D.cpp + test_copy_2D_2D_array.cpp + test_copy_3D_2D_array.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/typeWrappers.cpp + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_cl_copy_images + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_cl_copy_images + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/images/clFillImage/CMakeLists.txt b/test_conformance/images/clFillImage/CMakeLists.txt index 2e7cd564..29ad20fb 100644 --- a/test_conformance/images/clFillImage/CMakeLists.txt +++ b/test_conformance/images/clFillImage/CMakeLists.txt @@ -1,36 +1,46 @@ -add_executable(conformance_test_cl_fill_images - main.cpp - test_fill_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_fill_3D.cpp - test_fill_2D_3D.cpp - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/mt19937.c - ../../../test_common/harness/conversions.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c) - -set_source_files_properties( - main.cpp - test_fill_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_fill_3D.cpp - test_fill_2D_3D.cpp - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/conversions.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_cl_fill_images - ${CLConform_LIBRARIES}) +add_executable(conformance_test_cl_fill_images + main.cpp + test_fill_generic.cpp + test_fill_1D.cpp + test_fill_2D.cpp + test_fill_3D.cpp + test_fill_1D_array.cpp + test_fill_2D_array.cpp + test_loops.cpp + ../image_helpers.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/typeWrappers.cpp + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c) + +set_source_files_properties( + main.cpp + test_fill_generic.cpp + test_fill_1D.cpp + test_fill_2D.cpp + test_fill_3D.cpp + test_fill_1D_array.cpp + test_fill_2D_array.cpp + test_loops.cpp + ../image_helpers.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/typeWrappers.cpp + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_cl_fill_images + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_cl_fill_images + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/images/clGetInfo/CMakeLists.txt b/test_conformance/images/clGetInfo/CMakeLists.txt index 4d292d5e..8805af69 100644 --- a/test_conformance/images/clGetInfo/CMakeLists.txt +++ b/test_conformance/images/clGetInfo/CMakeLists.txt @@ -1,35 +1,43 @@ -add_executable(conformance_test_cl_get_info - main.cpp - test_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/mt19937.c - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.cpp - test_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_cl_get_info - ${CLConform_LIBRARIES}) +add_executable(conformance_test_cl_get_info + main.cpp + test_1D.cpp + test_2D.cpp + test_1D_2D_array.cpp + ../image_helpers.cpp + test_loops.cpp + test_3D.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp +) + +set_source_files_properties( + main.cpp + test_1D.cpp + test_2D.cpp + test_1D_2D_array.cpp + ../image_helpers.cpp + test_loops.cpp + test_3D.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_cl_get_info + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_cl_get_info + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/images/clReadWriteImage/CMakeLists.txt b/test_conformance/images/clReadWriteImage/CMakeLists.txt index 3f904542..a429a16e 100644 --- a/test_conformance/images/clReadWriteImage/CMakeLists.txt +++ b/test_conformance/images/clReadWriteImage/CMakeLists.txt @@ -1,35 +1,45 @@ -add_executable(conformance_test_cl_read_write_images - main.cpp - test_read_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_read_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/mt19937.c - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.cpp - test_read_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_read_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_cl_read_write_images - ${CLConform_LIBRARIES}) +add_executable(conformance_test_cl_read_write_images + main.cpp + test_read_1D.cpp + test_read_1D_array.cpp + test_read_2D.cpp + test_read_2D_array.cpp + ../image_helpers.cpp + test_loops.cpp + test_read_3D.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp +) + +set_source_files_properties( + main.cpp + test_read_1D.cpp + test_read_1D_array.cpp + test_read_2D.cpp + test_read_2D_array.cpp + ../image_helpers.cpp + test_loops.cpp + test_read_3D.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_cl_read_write_images + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_cl_read_write_images + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/images/kernel_image_methods/CMakeLists.txt b/test_conformance/images/kernel_image_methods/CMakeLists.txt index 976a1be6..80aebcd8 100644 --- a/test_conformance/images/kernel_image_methods/CMakeLists.txt +++ b/test_conformance/images/kernel_image_methods/CMakeLists.txt @@ -1,35 +1,45 @@ -add_executable(conformance_test_kernel_image_methods - main.cpp - test_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/mt19937.c - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.cpp - test_2D.cpp - ../image_helpers.cpp - test_loops.cpp - test_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_kernel_image_methods - ${CLConform_LIBRARIES}) +add_executable(conformance_test_kernel_image_methods + main.cpp + test_1D.cpp + test_1D_array.cpp + test_2D.cpp + test_2D_array.cpp + ../image_helpers.cpp + test_loops.cpp + test_3D.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp +) + +set_source_files_properties( + main.cpp + test_1D.cpp + test_1D_array.cpp + test_2D.cpp + test_2D_array.cpp + ../image_helpers.cpp + test_loops.cpp + test_3D.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_kernel_image_methods + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_kernel_image_methods + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/images/kernel_read_write/CMakeLists.txt b/test_conformance/images/kernel_read_write/CMakeLists.txt index bb19fbc9..daffad84 100644 --- a/test_conformance/images/kernel_read_write/CMakeLists.txt +++ b/test_conformance/images/kernel_read_write/CMakeLists.txt @@ -1,39 +1,55 @@ -add_executable(conformance_test_image_streams - main.cpp - test_iterations.cpp - ../image_helpers.cpp - test_loops.cpp - test_write_image.cpp - test_read_3D.cpp - test_write_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/mt19937.c - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.cpp - test_iterations.cpp - ../image_helpers.cpp - test_loops.cpp - test_write_image.cpp - test_read_3D.cpp - test_write_3D.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_image_streams - ${CLConform_LIBRARIES}) +add_executable(conformance_test_image_streams + main.cpp + test_iterations.cpp + ../image_helpers.cpp + test_loops.cpp + test_write_image.cpp + test_read_1D.cpp + test_read_3D.cpp + test_read_1D_array.cpp + test_read_2D_array.cpp + test_write_1D.cpp + test_write_3D.cpp + test_write_1D_array.cpp + test_write_2D_array.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp +) + +set_source_files_properties( + main.cpp + test_iterations.cpp + ../image_helpers.cpp + test_loops.cpp + test_write_image.cpp + test_read_1D.cpp + test_read_3D.cpp + test_read_1D_array.cpp + test_read_2D_array.cpp + test_write_1D.cpp + test_write_3D.cpp + test_write_1D_array.cpp + test_write_2D_array.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_image_streams + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_image_streams + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/images/samplerlessReads/CMakeLists.txt b/test_conformance/images/samplerlessReads/CMakeLists.txt index eb537899..d7fbdf91 100644 --- a/test_conformance/images/samplerlessReads/CMakeLists.txt +++ b/test_conformance/images/samplerlessReads/CMakeLists.txt @@ -1,36 +1,47 @@ -add_executable(conformance_test_samplerless_reads - main.cpp - test_iterations.cpp - test_loops.cpp - test_read_3D.cpp - ../image_helpers.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/mt19937.c - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.cpp - test_iterations.cpp - test_loops.cpp - test_read_3D.cpp - ../image_helpers.cpp - ../../../test_common/harness/errorHelpers.c - ../../../test_common/harness/threadTesting.c - ../../../test_common/harness/kernelHelpers.c - ../../../test_common/harness/imageHelpers.cpp - ../../../test_common/harness/conversions.c - ../../../test_common/harness/testHarness.c - ../../../test_common/harness/typeWrappers.cpp - ../../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_samplerless_reads - ${CLConform_LIBRARIES}) - +add_executable(conformance_test_samplerless_reads + main.cpp + test_iterations.cpp + test_loops.cpp + test_read_1D.cpp + test_read_1D_buffer.cpp + test_read_1D_array.cpp + test_read_2D_array.cpp + test_read_3D.cpp + ../image_helpers.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp +) + +set_source_files_properties( + main.cpp + test_iterations.cpp + test_loops.cpp + test_read_1D.cpp + test_read_1D_buffer.cpp + test_read_1D_array.cpp + test_read_2D_array.cpp + test_read_3D.cpp + ../image_helpers.cpp + ../../../test_common/harness/errorHelpers.c + ../../../test_common/harness/threadTesting.c + ../../../test_common/harness/kernelHelpers.c + ../../../test_common/harness/imageHelpers.cpp + ../../../test_common/harness/conversions.c + ../../../test_common/harness/testHarness.c + ../../../test_common/harness/mt19937.c + ../../../test_common/harness/msvc9.c + ../../../test_common/harness/typeWrappers.cpp + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_samplerless_reads + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_samplerless_reads + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/integer_ops/CMakeLists.txt b/test_conformance/integer_ops/CMakeLists.txt index f5e37335..29e38272 100644 --- a/test_conformance/integer_ops/CMakeLists.txt +++ b/test_conformance/integer_ops/CMakeLists.txt @@ -1,57 +1,71 @@ -add_executable(conformance_test_integer_ops - main.c - test_int_basic_ops.c - test_integers.cpp - test_upsample.cpp - test_intmul24.c test_intmad24.c - test_sub_sat.c test_add_sat.c - test_abs.c test_absdiff.c - test_unary_ops.cpp - verification_and_generation_functions.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/msvc9.c -) - -set_source_files_properties( - main.c - test_int_basic_ops.c - test_intmul24.c test_intmad24.c - test_sub_sat.c test_add_sat.c - test_abs.c test_absdiff.c - test_unary_ops.cpp - verification_and_generation_functions.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/conversions.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) -if (NOT CMAKE_CL_64 AND NOT MSVC) -set_source_files_properties( - main.c - test_int_basic_ops.c - test_intmul24.c test_intmad24.c - test_sub_sat.c test_add_sat.c - test_abs.c test_absdiff.c - test_unary_ops.cpp - verification_and_generation_functions.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/conversions.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/msvc9.c - COMPILE_FLAGS -march=i686) -endif (NOT CMAKE_CL_64 AND NOT MSVC) - -TARGET_LINK_LIBRARIES(conformance_test_integer_ops - ${CLConform_LIBRARIES}) +add_executable(conformance_test_integer_ops + main.c + test_popcount.c + test_int_basic_ops.c + test_integers.cpp + test_upsample.cpp + test_intmul24.c test_intmad24.c + test_sub_sat.c test_add_sat.c + test_abs.c test_absdiff.c + test_unary_ops.cpp + verification_and_generation_functions.c + ../../test_common/harness/conversions.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/kernelHelpers.c +) + +set_source_files_properties( + main.c + test_popcount.c + test_int_basic_ops.c + test_integers.cpp + test_upsample.cpp + test_intmul24.c test_intmad24.c + test_sub_sat.c test_add_sat.c + test_abs.c test_absdiff.c + test_unary_ops.cpp + verification_and_generation_functions.c + ../../test_common/harness/conversions.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/kernelHelpers.c + PROPERTIES LANGUAGE CXX) + +if (NOT CMAKE_CL_64 AND NOT MSVC) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)" AND NOT MSVC) +set_source_files_properties( + main.c + test_popcount.c + test_int_basic_ops.c + test_integers.cpp + test_upsample.cpp + test_intmul24.c test_intmad24.c + test_sub_sat.c test_add_sat.c + test_abs.c test_absdiff.c + test_unary_ops.cpp + verification_and_generation_functions.c + ../../test_common/harness/conversions.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/kernelHelpers.c + COMPILE_FLAGS -march=i686) +endif() +endif (NOT CMAKE_CL_64 AND NOT MSVC) + +TARGET_LINK_LIBRARIES(conformance_test_integer_ops + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_integer_ops + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/math_brute_force/CMakeLists.txt b/test_conformance/math_brute_force/CMakeLists.txt index fc424af9..ac6dafcb 100644 --- a/test_conformance/math_brute_force/CMakeLists.txt +++ b/test_conformance/math_brute_force/CMakeLists.txt @@ -1,76 +1,76 @@ -add_executable(conformance_bruteforce - FunctionList.c - Sleep.c - binary.c - binaryOperator.c - Utility.c - binary_i.c binary_two_results_i.c i_unary.c - macro_binary.c macro_unary.c mad.c - main.c reference_math_fma.c reference_math.c - ternary.c unary.c unary_two_results.c - unary_two_results_i.c unary_u.c - - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c -) - - -set_source_files_properties( - FunctionList.c - Sleep.c - binary.c - binaryOperator.c - Utility.c - binary_i.c binary_two_results_i.c i_unary.c - macro_binary.c macro_unary.c mad.c - main.c reference_math.c - ternary.c unary.c unary_two_results.c - unary_two_results_i.c unary_u.c - COMPILE_FLAGS -msse2) - -if (MSVC) -set_source_files_properties( - FunctionList.c - Sleep.c - binary.c - binaryOperator.c - Utility.c reference_math_fma.c - binary_i.c binary_two_results_i.c i_unary.c - macro_binary.c macro_unary.c mad.c - main.c reference_math.c - ternary.c unary.c unary_two_results.c - unary_two_results_i.c unary_u.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) -endif(MSVC) - -if (NOT CMAKE_CL_64 AND NOT MSVC) -set_source_files_properties( - FunctionList.c - Sleep.c - binary.c - binaryOperator.c - Utility.c reference_math_fma.c - binary_i.c binary_two_results_i.c i_unary.c - macro_binary.c macro_unary.c mad.c - main.c reference_math.c - ternary.c unary.c unary_two_results.c - unary_two_results_i.c unary_u.c - ../../test_common/harness/rounding_mode.c - ../../test_common/harness/ThreadPool.c - ../../test_common/harness/msvc9.c - COMPILE_FLAGS -march=i686) -endif(NOT CMAKE_CL_64 AND NOT MSVC) - -if(CMAKE_COMPILER_IS_GNUCC) -set_source_files_properties( - reference_math_fma.c - COMPILE_FLAGS -O0) -endif(CMAKE_COMPILER_IS_GNUCC) - -TARGET_LINK_LIBRARIES(conformance_bruteforce - ${CLConform_LIBRARIES}) +add_executable(conformance_test_bruteforce + FunctionList.c + Sleep.c + binary.c + binaryOperator.c + Utility.c + binary_i.c binary_two_results_i.c i_unary.c + macro_binary.c macro_unary.c mad.c + main.c reference_math.c + ternary.c unary.c unary_two_results.c + unary_two_results_i.c unary_u.c + + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + FunctionList.c + Sleep.c + binary.c + binaryOperator.c + Utility.c + binary_i.c binary_two_results_i.c i_unary.c + macro_binary.c macro_unary.c mad.c + main.c reference_math.c + ternary.c unary.c unary_two_results.c + unary_two_results_i.c unary_u.c + COMPILE_FLAGS -msse2) +endif() + +if (MSVC) +set_source_files_properties( + FunctionList.c + Sleep.c + binary.c + binaryOperator.c + Utility.c + binary_i.c binary_two_results_i.c i_unary.c + macro_binary.c macro_unary.c mad.c + main.c reference_math.c + ternary.c unary.c unary_two_results.c + unary_two_results_i.c unary_u.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) +endif(MSVC) + +if (NOT CMAKE_CL_64 AND NOT MSVC) +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)" AND NOT MSVC) +set_source_files_properties( + FunctionList.c + Sleep.c + binary.c + binaryOperator.c + Utility.c + binary_i.c binary_two_results_i.c i_unary.c + macro_binary.c macro_unary.c mad.c + main.c reference_math.c + ternary.c unary.c unary_two_results.c + unary_two_results_i.c unary_u.c + ../../test_common/harness/rounding_mode.c + ../../test_common/harness/ThreadPool.c + ../../test_common/harness/msvc9.c + COMPILE_FLAGS -march=i686) +endif() +endif(NOT CMAKE_CL_64 AND NOT MSVC) + +TARGET_LINK_LIBRARIES(conformance_test_bruteforce + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_bruteforce + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/mem_host_flags/CMakeLists.txt b/test_conformance/mem_host_flags/CMakeLists.txt new file mode 100644 index 00000000..d5319097 --- /dev/null +++ b/test_conformance/mem_host_flags/CMakeLists.txt @@ -0,0 +1,37 @@ +add_executable(conformance_test_mem_host_flags + main.cpp + mem_host_buffer.cpp + mem_host_image.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/conversions.c + ../../test_common/harness/ThreadPool.c +) + +set_source_files_properties( + main.cpp + mem_host_buffer.cpp + mem_host_image.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/conversions.c + ../../test_common/harness/ThreadPool.c + PROPERTIES LANGUAGE CXX) + +target_link_libraries(conformance_test_mem_host_flags + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_mem_host_flags + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/multiple_device_context/CMakeLists.txt b/test_conformance/multiple_device_context/CMakeLists.txt index 587b56c5..69291f64 100644 --- a/test_conformance/multiple_device_context/CMakeLists.txt +++ b/test_conformance/multiple_device_context/CMakeLists.txt @@ -1,32 +1,36 @@ -add_executable(conformance_test_multiples - main.c - test_multiple_contexts.c - test_multiple_devices.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/genericThread.cpp - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/conversions.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c -) - - -set_source_files_properties( - COMPILE_FLAGS -msse2) - -set_source_files_properties( - main.c - test_multiple_contexts.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_multiples - ${CLConform_LIBRARIES}) +add_executable(conformance_test_multiples + main.c + test_multiple_contexts.c + test_multiple_devices.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/genericThread.cpp + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/conversions.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + COMPILE_FLAGS -msse2) +endif() + +set_source_files_properties( + main.c + test_multiple_contexts.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_multiples + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_multiples + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/printf/CMakeLists.txt b/test_conformance/printf/CMakeLists.txt new file mode 100644 index 00000000..f366ee59 --- /dev/null +++ b/test_conformance/printf/CMakeLists.txt @@ -0,0 +1,23 @@ +add_executable(conformance_test_printf + test_printf.c + util_printf.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/msvc9.c +) + +set_source_files_properties( + test_printf.c + util_printf.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +target_link_libraries(conformance_test_printf + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_printf + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/profiling/CMakeLists.txt b/test_conformance/profiling/CMakeLists.txt index 4010130b..a82e2742 100644 --- a/test_conformance/profiling/CMakeLists.txt +++ b/test_conformance/profiling/CMakeLists.txt @@ -1,29 +1,33 @@ -add_executable(conformance_test_profiling - main.c readArray.c writeArray.c readImage.c writeImage.c copy.c - execute.c execute_multipass.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/imageHelpers.cpp - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - - -set_source_files_properties( - COMPILE_FLAGS -msse2) - -set_source_files_properties( - main.c readArray.c writeArray.c readImage.c writeImage.c copy.c - execute.c execute_multipass.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_profiling - ${CLConform_LIBRARIES}) +add_executable(conformance_test_profiling + main.c readArray.c writeArray.c readImage.c writeImage.c copy.c + execute.c execute_multipass.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/imageHelpers.cpp + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + COMPILE_FLAGS -msse2) +endif() + +set_source_files_properties( + main.c readArray.c writeArray.c readImage.c writeImage.c copy.c + execute.c execute_multipass.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_profiling + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_profiling + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/relationals/CMakeLists.txt b/test_conformance/relationals/CMakeLists.txt index 53606356..c2abf81d 100644 --- a/test_conformance/relationals/CMakeLists.txt +++ b/test_conformance/relationals/CMakeLists.txt @@ -1,35 +1,39 @@ -add_executable(conformance_test_relationals - main.c - test_relationals.cpp - test_comparisons_float.cpp - test_comparisons_double.cpp - test_shuffles.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - - -set_source_files_properties( - COMPILE_FLAGS -msse2) - -set_source_files_properties( - main.c - test_relationals.cpp - test_comparisons_float.cpp - test_comparisons_double.cpp - test_shuffles.cpp - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_relationals - ${CLConform_LIBRARIES}) +add_executable(conformance_test_relationals + main.c + test_relationals.cpp + test_comparisons_float.cpp + test_comparisons_double.cpp + test_shuffles.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + COMPILE_FLAGS -msse2) +endif() + +set_source_files_properties( + main.c + test_relationals.cpp + test_comparisons_float.cpp + test_comparisons_double.cpp + test_shuffles.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_relationals + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_relationals + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/select/CMakeLists.txt b/test_conformance/select/CMakeLists.txt index 5c466d32..12d383ee 100644 --- a/test_conformance/select/CMakeLists.txt +++ b/test_conformance/select/CMakeLists.txt @@ -1,25 +1,29 @@ -add_executable(conformance_test_select - test_select.c - util_select.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/errorHelpers.c -) - - -set_source_files_properties( - COMPILE_FLAGS -msse2) - -if(WIN32) -set_source_files_properties( - test_select.c - util_select.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/errorHelpers.c - PROPERTIES LANGUAGE CXX) -endif(WIN32) - -TARGET_LINK_LIBRARIES(conformance_test_select - ${CLConform_LIBRARIES}) +add_executable(conformance_test_select + test_select.c + util_select.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + COMPILE_FLAGS -msse2) +endif() + +if(WIN32) +set_source_files_properties( + test_select.c + util_select.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c + PROPERTIES LANGUAGE CXX) +endif(WIN32) + +TARGET_LINK_LIBRARIES(conformance_test_select + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_select + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/spir/CMakeLists.txt b/test_conformance/spir/CMakeLists.txt new file mode 100644 index 00000000..31bc31b0 --- /dev/null +++ b/test_conformance/spir/CMakeLists.txt @@ -0,0 +1,91 @@ +function (install_spir_artifacts suite_name) + install(FILES "${suite_name}.zip" DESTINATION "${CLConf_OUT_DIR}") +endfunction() + +add_executable( + conformance_test_spir + main.cpp + datagen.cpp + run_build_test.cpp + run_services.cpp + kernelargs.cpp + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/os_helpers.cpp + ../../test_common/harness/testHarness.c + ../../test_common/miniz/miniz.c) + +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(conformance_test_spir PROPERTIES + COMPILE_FLAGS "-fexceptions -frtti") +elseif(MSVC) + set_target_properties(conformance_test_spir PROPERTIES + COMPILE_FLAGS "/GR /EHs /EHc") +endif() + +TARGET_LINK_LIBRARIES(conformance_test_spir + ${CLConform_LIBRARIES}) + +# Need to copy the spir zips to sit beside the executable +add_custom_command(TARGET conformance_test_spir POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/khr.csv" "$/khr.csv" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/api.zip" "$/api.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/atomics.zip" "$/atomics.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/basic.zip" "$/basic.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/compile_and_link.zip" "$/compile_and_link.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/commonfns.zip" "$/commonfns.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/conversions.zip" "$/conversions.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/geometrics.zip" "$/geometrics.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/enum_values.zip" "$/enum_values.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/half.zip" "$/half.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/kernel_attributes.zip" "$/kernel_attributes.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/kernel_image_methods.zip" "$/kernel_image_methods.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/images_kernel_read_write.zip" "$/images_kernel_read_write.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/images_samplerlessRead.zip" "$/images_samplerlessRead.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/integer_ops.zip" "$/integer_ops.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/math_brute_force.zip" "$/math_brute_force.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/printf.zip" "$/printf.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/profiling.zip" "$/profiling.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/relationals.zip" "$/relationals.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/select.zip" "$/select.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/sampler_enumeration.zip" "$/sampler_enumeration.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/vec_align.zip" "$/vec_align.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/vec_step.zip" "$/vec_step.zip" + COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/binary_type.zip" "$/binary_type.zip") + +install(TARGETS conformance_test_spir + DESTINATION "${CLConf_OUT_DIR}") + +install_spir_artifacts(api) +install_spir_artifacts(atomics) +install_spir_artifacts(basic) +install_spir_artifacts(compile_and_link) +install_spir_artifacts(commonfns) +install_spir_artifacts(conversions) +install_spir_artifacts(geometrics) +install_spir_artifacts(enum_values) +install_spir_artifacts(half) +install_spir_artifacts(kernel_attributes) +install_spir_artifacts(kernel_image_methods) +install_spir_artifacts(images_kernel_read_write) +install_spir_artifacts(images_samplerlessRead) +install_spir_artifacts(integer_ops) +install_spir_artifacts(math_brute_force) +install_spir_artifacts(printf) +install_spir_artifacts(profiling) +install_spir_artifacts(relationals) +install_spir_artifacts(select) +install_spir_artifacts(sampler_enumeration) +install_spir_artifacts(vec_align) +install_spir_artifacts(vec_step) +install_spir_artifacts(binary_type) +install(FILES "khr.csv" DESTINATION "${CLConf_OUT_DIR}") +#Add any other runtime directories you need here. +# end of file # diff --git a/test_conformance/thread_dimensions/CMakeLists.txt b/test_conformance/thread_dimensions/CMakeLists.txt index 12b9267b..da18c628 100644 --- a/test_conformance/thread_dimensions/CMakeLists.txt +++ b/test_conformance/thread_dimensions/CMakeLists.txt @@ -1,30 +1,34 @@ -add_executable(conformance_test_thread_dimensions - main.c - test_thread_dimensions.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/typeWrappers.cpp - ../../test_common/harness/mt19937.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c -) - - -set_source_files_properties( - COMPILE_FLAGS -msse2) - -set_source_files_properties( - main.c - test_thread_dimensions.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/threadTesting.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/conversions.c - ../../test_common/harness/msvc9.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_thread_dimensions - ${CLConform_LIBRARIES}) +add_executable(conformance_test_thread_dimensions + main.c + test_thread_dimensions.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/typeWrappers.cpp + ../../test_common/harness/mt19937.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + COMPILE_FLAGS -msse2) +endif() + +set_source_files_properties( + main.c + test_thread_dimensions.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/threadTesting.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/conversions.c + ../../test_common/harness/msvc9.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_thread_dimensions + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_thread_dimensions + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/vec_align/CMakeLists.txt b/test_conformance/vec_align/CMakeLists.txt index c4d76c35..9d7b5f89 100644 --- a/test_conformance/vec_align/CMakeLists.txt +++ b/test_conformance/vec_align/CMakeLists.txt @@ -1,33 +1,37 @@ -add_executable(conformance_test_vecalign - globals.c - main.c - structs.c - test_vec_align.c - type_replacer.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/conversions.c -) - - -set_source_files_properties( - COMPILE_FLAGS -msse2) - -set_source_files_properties( - globals.c - main.c - structs.c - test_vec_align.c - type_replacer.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/errorHelpers.c - ../../test_common/harness/conversions.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_vecalign - ${CLConform_LIBRARIES}) +add_executable(conformance_test_vecalign + globals.c + main.c + structs.c + test_vec_align.c + type_replacer.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/conversions.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + COMPILE_FLAGS -msse2) +endif() + +set_source_files_properties( + globals.c + main.c + structs.c + test_vec_align.c + type_replacer.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c + ../../test_common/harness/conversions.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_vecalign + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_vecalign + DESTINATION "${CLConf_OUT_DIR}") diff --git a/test_conformance/vec_step/CMakeLists.txt b/test_conformance/vec_step/CMakeLists.txt index c37d078f..49fb64da 100644 --- a/test_conformance/vec_step/CMakeLists.txt +++ b/test_conformance/vec_step/CMakeLists.txt @@ -1,31 +1,35 @@ -add_executable(conformance_test_vecstep - globals.c - test_step.c - main.c - structs.c - type_replacer.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/mt19937.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/errorHelpers.c -) - - -set_source_files_properties( - COMPILE_FLAGS -msse2) - -set_source_files_properties( - globals.c - test_step.c - main.c - structs.c - type_replacer.c - ../../test_common/harness/testHarness.c - ../../test_common/harness/msvc9.c - ../../test_common/harness/kernelHelpers.c - ../../test_common/harness/errorHelpers.c - PROPERTIES LANGUAGE CXX) - -TARGET_LINK_LIBRARIES(conformance_test_vecstep - ${CLConform_LIBRARIES}) +add_executable(conformance_test_vecstep + globals.c + test_step.c + main.c + structs.c + type_replacer.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/mt19937.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c +) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC) +set_source_files_properties( + COMPILE_FLAGS -msse2) +endif() + +set_source_files_properties( + globals.c + test_step.c + main.c + structs.c + type_replacer.c + ../../test_common/harness/testHarness.c + ../../test_common/harness/msvc9.c + ../../test_common/harness/kernelHelpers.c + ../../test_common/harness/errorHelpers.c + PROPERTIES LANGUAGE CXX) + +TARGET_LINK_LIBRARIES(conformance_test_vecstep + ${CLConform_LIBRARIES}) + +install(TARGETS conformance_test_vecstep + DESTINATION "${CLConf_OUT_DIR}")