cmake_minimum_required(VERSION 3.1)

project(SofaOpenglVisual_test)

set(SOURCE_FILES
    LightManager_test.cpp
    OglLabel_test.cpp
    Light_test.cpp
    ClipPlane_test.cpp
)

add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} SofaGTestMain SofaTest)

add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})

cmake_minimum_required(VERSION 3.1)

project(SofaOpenglVisual_test)

set(SOURCE_FILES
    OglLabel_test.cpp
)

## MAC-OS crash when we are testing opengl feature.
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
    list(APPEND SOURCE_FILES
        Light_test.cpp
        LightManager_test.cpp
        ClipPlane_test.cpp)
endif()


add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} SofaGTestMain SofaTest)

add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})

Exclude some test involving opengl on macos.
[SofaOpenglVisual_test] Exclude some test involving opengl on macos.

It seems that component that rely on an opengl context are crashing
on MacOS. So we disable all the test when we are on darwing.

(This is pretty bad I know)
