Skip to content
Snippets Groups Projects
Commit 602587d9 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

cmake (gmsh) : add an option to disable ctest (so that I can use ctest

in dg and still include gmsh CMakeList.txt)
parent 235105b2
No related branches found
No related tags found
No related merge requests found
......@@ -1760,24 +1760,27 @@ endif(ENABLE_WRAP_JAVA)
include(CPack)
include(CTest)
file(GLOB_RECURSE TESTFILES
tutorial/*.geo demos/*.geo benchmarks/?d/*.geo benchmarks/extrude/*.geo)
foreach(TESTFILE ${TESTFILES})
# use relative path for cygwin/mingw (the pure win exe built with the mingw
# compilers does not understand a full cygwin-style path)
FILE(RELATIVE_PATH TEST ${CMAKE_CURRENT_BINARY_DIR} ${TESTFILE})
add_test(${TEST} ./gmsh ${TEST} -3 -nopopup -o ./tmp.msh)
endforeach()
# if(HAVE_PYTHON)
# file(GLOB_RECURSE TESTFILES tutorial/*.py)
# foreach(TESTFILE ${TESTFILES})
# add_test(NAME ${TESTFILE}
# COMMAND ${PYTHON_EXECUTABLE}
# ${TESTFILE} $<CONFIGURATION>)
# # sys.path.insert(0, "path/to/your/package")
# endforeach()
# endif(HAVE_PYTHON)
if(NOT DISABLE_GMSH_TESTS)
#disabling tests is usefull when including this CMakeLists in an external project
include(CTest)
file(GLOB_RECURSE TESTFILES
tutorial/*.geo demos/*.geo benchmarks/?d/*.geo benchmarks/extrude/*.geo)
foreach(TESTFILE ${TESTFILES})
# use relative path for cygwin/mingw (the pure win exe built with the mingw
# compilers does not understand a full cygwin-style path)
FILE(RELATIVE_PATH TEST ${CMAKE_CURRENT_BINARY_DIR} ${TESTFILE})
add_test(${TEST} ./gmsh ${TEST} -3 -nopopup -o ./tmp.msh)
endforeach()
# if(HAVE_PYTHON)
# file(GLOB_RECURSE TESTFILES tutorial/*.py)
# foreach(TESTFILE ${TESTFILES})
# add_test(NAME ${TESTFILE}
# COMMAND ${PYTHON_EXECUTABLE}
# ${TESTFILE} $<CONFIGURATION>)
# # sys.path.insert(0, "path/to/your/package")
# endforeach()
# endif(HAVE_PYTHON)
endif(NOT DISABLE_GMSH_TESTS)
message(STATUS "")
message(STATUS "Gmsh ${GMSH_VERSION} has been configured for ${GMSH_OS}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment