diff options
| author | don bright <hugh.m.bright@gmail.com> | 2013-01-31 04:36:12 (GMT) | 
|---|---|---|
| committer | don bright <hugh.m.bright@gmail.com> | 2013-01-31 04:36:12 (GMT) | 
| commit | e184c014f081efad1953f1f68755deec9c503d5a (patch) | |
| tree | adb620ebaf106fcee69d960a72c26f2d066a9853 /tests | |
| parent | 3ee7e9de2c7e4dfbc18ed682089ee0aac0893a87 (diff) | |
tests:detect whether openscad gui binary has been built - fail if not
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/CMakeLists.txt | 12 | 
1 files changed, 9 insertions, 3 deletions
| diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 246fe63..bb2ab06 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -573,7 +573,7 @@ set_target_properties(throwntogethertest PROPERTIES COMPILE_FLAGS "-DENABLE_OPEN  target_link_libraries(throwntogethertest tests-offscreen tests-cgal ${OPENCSG_LIBRARY} ${TESTS-CGAL-LIBRARIES} ${GLEW_LIBRARY} ${COCOA_LIBRARY})  # -# gui tests (simple wrappers around the GUI binary built by qmake) +# GUI binary tests  #  if(APPLE)    set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../OpenSCAD.app/Contents/MacOS/OpenSCAD") @@ -583,8 +583,14 @@ else()    set(GUI_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../openscad")  endif() -add_executable(guicgalpngtest guicgalpngtest.cc) -set_target_properties(guicgalpngtest PROPERTIES COMPILE_FLAGS "-DBINPATH=${GUI_BINPATH}") +if(EXISTS "${GUI_BINPATH}") +  add_executable(guicgalpngtest guicgalpngtest.cc) +  set_target_properties(guicgalpngtest PROPERTIES COMPILE_FLAGS "-DBINPATH=${GUI_BINPATH}") +  message(STATUS "Found OpenSCAD GUI binary: ${GUI_BINPATH}") +else() +  message(STATUS "Couldn't find the OpenSCAD GUI binary: ${GUI_BINPATH}") +  message(FATAL_ERROR "Please build the OpenSCAD GUI binary and place it here: ${GUI_BINPATH}" ) +endif()  #  # Tags tests as disabled. This is more convenient than removing them manually | 
