CMakeLists.txt 1.59 KB
Newer Older
Andy Cedilnik's avatar
Andy Cedilnik committed
1 2 3 4 5 6 7 8 9 10 11
# Id
#
## Copyright 2003 Sandia Coporation
## Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
## license for use of this work by or on behalf of the U.S. Government.
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that this Notice and any statement
## of authorship are reproduced on all copies.
#

SET(MyTests
12
	SimpleExample.c
Andy Cedilnik's avatar
Andy Cedilnik committed
13 14 15
	BlankTiles.c
	CompressionSize.c
	DisplayNoDraw.c
16
#	RandomTransform.c
Andy Cedilnik's avatar
Andy Cedilnik committed
17 18 19 20 21 22 23 24 25 26
	)

SET(UTIL_SRCS init.c ppm.c)

IF (WIN32)
  SET(UTIL_SRCS ${UTIL_SRCS} glwin_wgl.c)
ELSE (WIN32)
  SET(UTIL_SRCS ${UTIL_SRCS} glwin_glx.c)
ENDIF (WIN32)

27 28
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})

Andy Cedilnik's avatar
Andy Cedilnik committed
29 30 31 32 33
CREATE_TEST_SOURCELIST(Tests icetTests_mpi.c ${MyTests}
		       EXTRA_INCLUDE mpi_comm.h
		       FUNCTION init_mpi_comm)

ADD_EXECUTABLE(icetTests_mpi ${Tests} ${UTIL_SRCS})
Berk Geveci's avatar
Berk Geveci committed
34
TARGET_LINK_LIBRARIES(icetTests_mpi icet icet_strategies icet_mpi ${OPENGL_glu_LIBRARY})
Andy Cedilnik's avatar
Andy Cedilnik committed
35 36 37 38 39 40

IF (ICET_MPIRUN_EXE)
  SET(PRE_TEST_FLAGS ${ICET_MPIRUN_EXE} ${ICET_MPI_PREFLAGS})
  SET(POST_TEST_FLAGS ${ICET_MPI_POSTFLAGS})
ENDIF (ICET_MPIRUN_EXE)

Kenneth Moreland's avatar
Kenneth Moreland committed
41
SET(ICET_TEST_FLAGS "-redirect" CACHE STRING "Arguments given to the test program.")
Andy Cedilnik's avatar
Andy Cedilnik committed
42 43 44 45 46 47 48 49 50 51 52 53
MARK_AS_ADVANCED(ICET_TEST_FLAGS)
SEPARATE_ARGUMENTS(ICET_TEST_FLAGS)

FOREACH (test ${MyTests})
  GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
  ADD_TEST(${TName}
	   ${PRE_TEST_FLAGS}
		${C_TEST_PATH}/icetTests_mpi ${ICET_TEST_FLAGS} ${TName}
		${POST_TEST_FLAGS})
ENDFOREACH(test)

IF (WIN32)
Kenneth Moreland's avatar
Kenneth Moreland committed
54
  ADD_CUSTOM_TARGET(logclean erase log.???? *.ppm)
Andy Cedilnik's avatar
Andy Cedilnik committed
55
ELSE (WIN32)
56
  ADD_CUSTOM_TARGET(logclean rm -f log.???? *.ppm core.*)
Andy Cedilnik's avatar
Andy Cedilnik committed
57
ENDIF (WIN32)