Debian Codegraph @

packages/seacas/libraries/exoIIv2for32/test/CMakeLists.txt

raw
1 # Copyright(C) 1999-2021 National Technology & Engineering Solutions
2 # of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 # NTESS, the U.S. Government retains certain rights in this software.
4 #
5 # See packages/seacas/LICENSE for details
6
7 ADD_DEFINITIONS(-DUSING_CMAKE)
8
9 if ( NETCDF_NCDUMP_BINARY )
10 # Do nothing. Set earlier in config process...
11 else()
12 find_program (NETCDF_NCDUMP_BINARY
13 NAME ncdump
14 PATHS
15 ${NetCDF_BINARY_DIR}
16 ${Netcdf_LIBRARY_DIRS}/../bin
17 $ENV{ACCESS}/bin
18 $ENV{NETCDF_DIR}/bin
19 $ENV{NETCDF_DIR}/ncdump
20 ENV PATH
21 ${NetCDF_DIR}/bin
22 )
23 endif()
24
25 # ===============================================
26
27 IF ( NETCDF_NCDUMP_BINARY )
28 SET(NETCDF_NCDUMP ${NETCDF_NCDUMP_BINARY})
29 SET( forbind_OLDTESTS
30 testwt
31 testwtd
32 testrd
33 testrdd
34 testwtdi64
35 testrddi64
36 )
37
38 CONFIGURE_FILE(
39 ${CMAKE_CURRENT_SOURCE_DIR}/testall.in
40 ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testall
41 @ONLY
42 )
43 # now copy the temporary into the final destination, setting the permissions
44 file(COPY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testall
45 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
46 FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
47
48 # NOTE: The "LINKER_LANGUAGE CXX" is used to workaround an issue with
49 # the trilinos cmake adding the pamgen and pamgen_extras libraries as
50 # a dependency. These are C++ libraries and result in unresolved dependencies
51 # when built with shareable libraries on some platforms....
52
53 FOREACH ( testName ${forbind_OLDTESTS} )
54 TRIBITS_ADD_EXECUTABLE( f32_${testName} NOEXEPREFIX NOEXESUFFIX LINKER_LANGUAGE Fortran SOURCES ${testName}.f)
55 ENDFOREACH ( testName )
56
57 TRIBITS_ADD_TEST(
58 testall
59 NOEXEPREFIX
60 NOEXESUFFIX
61 NAME exodus_unit_tests_for32
62 COMM mpi serial
63 NUM_MPI_PROCS 1
64 )
65
66 if ( TPL_Netcdf_Enables_Netcdf4 )
67 CONFIGURE_FILE(
68 ${CMAKE_CURRENT_SOURCE_DIR}/testall_i64.in
69 ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testall_i64
70 @ONLY
71 )
72 # now copy the temporary into the final destination, setting the permissions
73 file(COPY ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/testall_i64
74 DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
75 FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
76
77 TRIBITS_ADD_TEST(
78 testall
79 NOEXEPREFIX
80 NOEXESUFFIX
81 NAME exodus_unit_tests_for32_64
82 ARGS netcdf4
83 COMM mpi serial
84 NUM_MPI_PROCS 1
85 )
86
87 TRIBITS_ADD_TEST(
88 testall_i64
89 NOEXEPREFIX
90 NOEXESUFFIX
91 NAME exodus_nc4_unit_tests_for32
92 COMM mpi serial
93 NUM_MPI_PROCS 1
94 )
95 endif()
96 ELSE()
97 MESSAGE(STATUS
98 "WARNING: ${PACKAGE_NAME}: Exodus unit tests will not be run due to failure finding ncdump executable.")
99 ENDIF()