Commit a77a30e6 authored by Claudio's avatar Claudio Committed by Brad King

FindGLEW: Add test

parent a7d85386
......@@ -1445,6 +1445,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
add_subdirectory(FindGit)
endif()
if(CMake_TEST_FindGLEW)
add_subdirectory(FindGLEW)
endif()
if(CMake_TEST_FindGSL)
add_subdirectory(FindGSL)
endif()
......
add_test(NAME FindGLEW.Test COMMAND
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
--build-and-test
"${CMake_SOURCE_DIR}/Tests/FindGLEW/Test"
"${CMake_BINARY_DIR}/Tests/FindGLEW/Test"
${build_generator_args}
--build-project TestFindGLEW
--build-options ${build_options}
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
)
cmake_minimum_required(VERSION 3.1)
project(TestFindGLEW LANGUAGES CXX)
include(CTest)
find_package(GLEW REQUIRED)
add_executable(test_glew_shared_tgt main.cpp)
target_link_libraries(test_glew_shared_tgt GLEW::GLEW)
add_test(NAME test_glew_shared_tgt COMMAND test_glew_shared_tgt)
add_executable(test_glew_generic_tgt main.cpp)
target_link_libraries(test_glew_generic_tgt GLEW::glew)
add_test(NAME test_glew_generic_tgt COMMAND test_glew_generic_tgt)
add_executable(test_glew_var main.cpp)
target_include_directories(test_glew_var PRIVATE ${GLEW_INCLUDE_DIRS})
target_link_libraries(test_glew_var PRIVATE ${GLEW_LIBRARIES})
add_test(NAME test_glew_var COMMAND test_glew_var)
#include <GL/glew.h>
int main()
{
GLenum init_return = glewInit();
return (init_return == GLEW_OK);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment