Files
OpenCL-CTS/test_conformance/gl/CMakeLists.txt
Bhargav Das 2c0abd3f75 Fixed test runner files and output binary files (#464)
Put "run_conformance.py" and all test runner files ".csv" in build directory

Put "run_conformance.py" and all test runner files ".csv" in build directory
Added steps in CMakeLists.txt to copy the ".csv" files and "run_conformance.py" from 'test_conformance' directory

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>

cl12: change binary names to aligned with the test runner files

Changed output binary names to match with the test runner files .csv files

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>

Removed relative paths, changed comment style

Removed relative paths and replaced with CMake variables
Changed comment style to match with remaining comment style to maintain consistency

changed destination relative path with cmake variable

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>

fixed binary name in test runner files

Signed-off-by: bhargavthriler <bhargavthriler@gmail.com>
2020-01-10 15:12:11 +00:00

79 lines
2.5 KiB
CMake

if(WIN32)
# Windows MSVC/Intel compiler hits:
# - dwonload free libraries package glew and glut/freeglut from the Internet
# - add x64/x86 binaries with glew and glut/freeglut libraries (.lib) to the directory lib/x64 or lib/x86.
# Include folder libs as cmake argument -DCLConform_GL_LIBRARIES_DIR=lib\x64 while solution generation
# - GL headers files should be added to project source directory and GL subdirectory
# - Add .dll files: glut glew to the test binary location.
list(APPEND CLConform_LIBRARIES opengl32 freeglut glew32)
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
../../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)
add_executable(test_gl
${GL_SOURCES} ${GLUT_SOURCES})
set_source_files_properties(
${GL_SOURCES}
PROPERTIES LANGUAGE CXX)
# Add the current folder to the include path, so that
# test_common/gl/setup_x11.cpp can find testBase.h which is located in this
# folder.
target_include_directories(test_gl
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
TARGET_LINK_LIBRARIES(test_gl
${CLConform_LIBRARIES})
add_dependencies(OpenCLCTS test_gl)
install(TARGETS test_gl
DESTINATION "${CLConf_OUT_DIR}"
COMPONENT OpenCLCTS)