Debian Codegraph @

packages/stk/stk_unit_tests/stk_mesh/CMakeLists.txt

raw
1 # Copyright 2002 - 2008, 2010, 2011 National Technology Engineering
2 # Solutions of Sandia, LLC (NTESS). Under the terms of Contract
3 # DE-NA0003525 with NTESS, the U.S. Government retains certain rights
4 # in this software.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are
8 # met:
9 #
10 # * Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 #
13 # * Redistributions in binary form must reproduce the above
14 # copyright notice, this list of conditions and the following
15 # disclaimer in the documentation and/or other materials provided
16 # with the distribution.
17 #
18 # * Neither the name of NTESS nor the names of its contributors
19 # may be used to endorse or promote products derived from this
20 # software without specific prior written permission.
21 #
22 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 #
34
35 FILE(GLOB SOURCES CONFIGURE_DEPENDS
36 *.cpp
37 change_parts/*.cpp
38 custom_ghosting/*.cpp
39 entitySorting/*.cpp
40 edge_creation/*.cpp
41 face_creation/*.cpp
42 face_creation/element_graph/*.cpp
43 face_creation/integration/*.cpp
44 face_creation/mesh_diagnostics/*.cpp
45 face_creation/skin_mesh/*.cpp
46 face_creation/user_created/*.cpp
47 ngp/*.cpp
48 )
49
50 IF(NOT ${PROJECT_NAME}_ENABLE_STKIO)
51 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestFieldBLAS.cpp")
52 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestAddNodeSharingWithInternalSideset.cpp")
53 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestAura.cpp")
54 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestAuraToShared.cpp")
55 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestBoundaryAnalysis.cpp")
56 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestBucket.cpp")
57 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestBulkData.cpp")
58 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestBulkDataIdMapper.cpp")
59 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestBulkDataNotifications.cpp")
60 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestBulkDataSharing.cpp")
61 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCheckOwnedOrphanedSidesOrEdges.cpp")
62 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCEO.cpp")
63 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCEOME.cpp")
64 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCEONodes.cpp")
65 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestChangeEntityOwnerCommMaps.cpp")
66 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCheckUniqueGlobalIds.cpp")
67 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestChangeParts.cpp")
68 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCommInfoObserver.cpp")
69 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCommunicateFieldData.cpp")
70 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCreateEdges.cpp")
71 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestCreateFaces.cpp")
72 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestDeletedEntityCache.cpp")
73 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestDeleteEntities.cpp")
74 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestDestroyElements.cpp")
75 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestDistributedIndexWithBulkData.cpp")
76 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestElemGraphCoincidentElements.cpp")
77 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestEntitiesNodesHaveInCommon.cpp")
78 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestEntityProcMapping.cpp")
79 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestFEMHelper.cpp")
80 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestField.cpp")
81 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestFieldQueryFunctions.cpp")
82 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestForEachEntityLoopAbstractions.cpp")
83 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestGenIds.cpp")
84 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestGetEntities.cpp")
85 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestGhostingWithModification.cpp")
86 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestGhostingWithShared.cpp")
87 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestInducedPart.cpp")
88 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestKeyhole.cpp")
89 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestLocalIds.cpp")
90 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestMeshImplUtils.cpp")
91 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestMeshModLogObserver.cpp")
92 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestModificationEnd.cpp")
93 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestModificationSummary.cpp")
94 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestNoUpwardConnectivity.cpp")
95 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestParallelGraphInfo.cpp")
96 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestPartAfterCommit.cpp")
97 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestPartAlias.cpp")
98 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestPartToBucket.cpp")
99 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestSelfContainedModCycles.cpp")
100 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestSidePolarity.cpp")
101 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestSideSet.cpp")
102 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestStkTextMesh.cpp")
103 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestTextMesh.cpp")
104 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestTopology.cpp")
105 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTestVisitAura.cpp")
106 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/UnitTest3Tets3Procs.cpp")
107 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/change_parts/CustomGhostEntities.cpp")
108 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/entitySorting/UnitTestEntitySorting.cpp")
109 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/edge_creation/UnitTestEdgeConnection.cpp")
110 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/edge_creation/UnitTestEdgesOnFaces.cpp")
111 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/FaceCreatorFixture.cpp")
112 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/TwoHexesTwoProcs.cpp")
113 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/TwoHexesTwoProcsEGWithPermutations.cpp")
114 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/TwoHexesTwoProcsElemGraph.cpp")
115 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/TwQuads2DTwoProcsElemGraph.cpp")
116 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/BulkDataElementGraphTester.cpp")
117 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/ElementGraphAddElements.cpp")
118 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/ElementGraphDeleteElements.cpp")
119 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/UnitTestElemGraphMultipleSharedSides.cpp")
120 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/UnitTestElemElemGraph.cpp")
121 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/UnitTestElemElemGraphChangeOwner.cpp")
122 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/UnitTestElemElemGraphDeathIntegration.cpp")
123 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/UnitTestElementDeath.cpp")
124 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/element_graph/UnitTestSideIdPool.cpp")
125 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/integration/UnitTestSkinMeshElementDeath.cpp")
126 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/mesh_diagnostics/UnitTestRuleThreeViolation.cpp")
127 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMesh.cpp")
128 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshCoincidentElements.cpp")
129 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshDegenerate.cpp")
130 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshHeterogenous.cpp")
131 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshExposedBoundary.cpp")
132 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshMultipleSharedSides.cpp")
133 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshRefined.cpp")
134 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshShell.cpp")
135 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshSkinPart.cpp")
136 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/skin_mesh/UnitTestSkinMeshUseCaseUtils.cpp")
137 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/face_creation/user_created/UnitTestFaceSharingUsingGraph.cpp")
138 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/NgpDebugFieldSync_Fixtures.cpp")
139 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/NgpParallelSumTest.cpp")
140 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/NgpMeshManagerTest.cpp")
141 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/TestNgpMeshUpdate.cpp")
142 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/howToNgp.cpp")
143 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/howToNgpMeshMod.cpp")
144 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/implNgpMeshMod.cpp")
145 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/NgpFieldAsyncTest.cpp")
146 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/ngpFieldBLASTest.cpp")
147 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/ngpFieldTest.cpp")
148 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/UnitTestNgp.cpp")
149 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/UnitTestNgpDebugFieldSync.cpp")
150 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/UnitTestNgpDebugFieldSync_AccessDuringMeshModification.cpp")
151 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/UnitTestNgpDebugFieldSync_MeshModification.cpp")
152 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/UnitTestNgpDebugFieldSync_MultiStateRotation.cpp")
153 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/UnitTestNgpDebugFieldSync_PartialAllocation.cpp")
154 LIST(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ngp/UnitTestNgpDebugFieldSync_PartialSync.cpp")
155 ENDIF()
156
157 if(HAVE_STK_Trilinos)
158 TRIBITS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
159
160 TRIBITS_ADD_EXECUTABLE_AND_TEST(stk_mesh_utest
161 SOURCES ${SOURCES}
162 TESTONLYLIBS stk_unit_main
163 ARGS ""
164 COMM serial mpi
165 NUM_MPI_PROCS 1-4
166 NOEXEPREFIX
167 )
168 else()
169 add_executable(stk_mesh_utest ${SOURCES})
170 target_link_libraries(stk_mesh_utest stk_unit_test_utils)
171
172 target_include_directories(stk_mesh_utest PUBLIC
173 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
174 $<INSTALL_INTERFACE:include>
175 )
176
177 if(${PROJECT_NAME}_ENABLE_STKIO)
178 target_link_libraries(stk_mesh_utest stk_io)
179 endif()
180 target_link_libraries(stk_mesh_utest stk_mesh_fixtures)
181 target_link_libraries(stk_mesh_utest stk_mesh_base)
182 target_link_libraries(stk_mesh_utest stk_unit_main)
183
184 INSTALL(TARGETS stk_mesh_utest DESTINATION ${STK_INSTALL_BINDIR})
185
186 FOREACH(NUMPROCS 1 2 3 4)
187 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/np${NUMPROCS})
188 add_test(NAME "stk_mesh_utest_np${NUMPROCS}"
189 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/np${NUMPROCS}
190 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NUMPROCS} ${CMAKE_CURRENT_BINARY_DIR}/stk_mesh_utest
191 --gtest_filter=-*externalFile)
192 set_property(TEST "stk_mesh_utest_np${NUMPROCS}" PROPERTY PROCESSORS ${NUMPROCS})
193 ENDFOREACH()
194
195 endif()
196