Skip to content
Snippets Groups Projects
Verified Commit 4e95dc5c authored by Lars Bilke's avatar Lars Bilke
Browse files

[cmake] Use ogs_add_executable().

parent a1b4a828
No related branches found
No related tags found
No related merge requests found
Showing
with 24 additions and 19 deletions
......@@ -48,7 +48,7 @@ if(OGS_USE_PYTHON)
)
endif()
add_executable(ogs ogs.cpp)
ogs_add_executable(ogs ogs.cpp)
target_link_libraries(
ogs
......
......@@ -21,8 +21,12 @@ source_group("UI Files" FILES ${UIS})
set(APP_ICON ${SOURCE_DIR_REL}/scripts/packaging/ogs-de-icon.icns)
# Create the executable
add_executable(DataExplorer main.cpp ${SOURCES} ${UIS} ${APP_ICON} exe-icon.rc)
target_compile_definitions(DataExplorer PUBLIC $<$<BOOL:${VTK_ADDED}>:VTK_VIA_CPM>)
ogs_add_executable(
DataExplorer main.cpp ${SOURCES} ${UIS} ${APP_ICON} exe-icon.rc
)
target_compile_definitions(
DataExplorer PUBLIC $<$<BOOL:${VTK_ADDED}>:VTK_VIA_CPM>
)
target_link_libraries(
DataExplorer
......
......@@ -21,7 +21,7 @@ if(OGS_BUILD_GUI)
endif()
foreach(tool ${TOOLS})
add_executable(${tool} ${tool}.cpp)
ogs_add_executable(${tool} ${tool}.cpp)
target_link_libraries(
${tool} ApplicationsFileIO GitInfoLib MeshLib MeshGeoToolsLib tclap
)
......
......@@ -4,7 +4,7 @@ endif()
set(TOOLS MoveGeometry TriangulatePolyline)
foreach(tool ${TOOLS})
add_executable(${tool} ${tool}.cpp)
ogs_add_executable(${tool} ${tool}.cpp)
target_link_libraries(
${tool} GeoLib GitInfoLib ApplicationsFileIO tclap Qt5::Core
)
......
......@@ -26,9 +26,8 @@ set(TOOLS
)
if(OGS_BUILD_GUI)
add_executable(
RemoveGhostData
RemoveGhostData.cpp
ogs_add_executable(
RemoveGhostData RemoveGhostData.cpp
${PROJECT_SOURCE_DIR}/ThirdParty/paraview/vtkCleanUnstructuredGrid.cpp
)
target_include_directories(
......@@ -39,7 +38,7 @@ if(OGS_BUILD_GUI)
endif()
foreach(tool ${TOOLS})
add_executable(${tool} ${tool}.cpp)
ogs_add_executable(${tool} ${tool}.cpp)
target_link_libraries(${tool} GitInfoLib MeshLib tclap)
endforeach()
install(TARGETS ${TOOLS} RUNTIME DESTINATION bin)
......
......@@ -15,7 +15,7 @@ if(OGS_BUILD_GUI)
endif()
foreach(tool ${TOOLS})
add_executable(${tool} ${tool}.cpp)
ogs_add_executable(${tool} ${tool}.cpp)
target_link_libraries(
${tool} ApplicationsFileIO GitInfoLib MeshLib MeshGeoToolsLib tclap
)
......
......@@ -2,7 +2,7 @@ set(TOOLS ComputeNodeAreasFromSurfaceMesh convertVtkDataArrayToVtkDataArray
createNeumannBc scaleProperty
)
foreach(tool ${TOOLS})
add_executable(${tool} ${tool}.cpp)
ogs_add_executable(${tool} ${tool}.cpp)
target_link_libraries(${tool} GitInfoLib MeshLib tclap)
endforeach()
install(TARGETS ${TOOLS} RUNTIME DESTINATION bin)
......
......@@ -6,7 +6,9 @@ CPMAddPackage(
)
include(${PROJECT_SOURCE_DIR}/scripts/cmake/MetisSetup.cmake)
add_executable(partmesh PartitionMesh.cpp Metis.cpp NodeWiseMeshPartitioner.cpp)
ogs_add_executable(
partmesh PartitionMesh.cpp Metis.cpp NodeWiseMeshPartitioner.cpp
)
target_link_libraries(partmesh GitInfoLib MeshLib tclap)
add_dependencies(partmesh mpmetis)
install(TARGETS partmesh RUNTIME DESTINATION bin)
......@@ -9,7 +9,7 @@ target_link_libraries(
set_target_properties(OGSFileConverterLib PROPERTIES AUTOMOC TRUE AUTOUIC TRUE)
add_executable(OGSFileConverter main.cpp)
ogs_add_executable(OGSFileConverter main.cpp)
target_link_libraries(
OGSFileConverter PUBLIC ApplicationsFileIO GitInfoLib OGSFileConverterLib
......
if(OGS_BUILD_PROCESS_LIE)
add_executable(postLIE postLIE.cpp)
ogs_add_executable(postLIE postLIE.cpp)
target_link_libraries(postLIE GitInfoLib LIECommon tclap)
install(TARGETS postLIE RUNTIME DESTINATION bin)
endif()
if(OGS_BUILD_GUI)
add_executable(Raster2PointCloud Raster2PointCloud.cpp)
ogs_add_executable(Raster2PointCloud Raster2PointCloud.cpp)
target_link_libraries(
Raster2PointCloud ApplicationsFileIO BaseLib GitInfoLib tclap
VtkVisFilter
......
add_executable(SWMMConverter SWMMConverter.cpp)
ogs_add_executable(SWMMConverter SWMMConverter.cpp)
target_link_libraries(
SWMMConverter
ApplicationsFileIO
......
......@@ -4,7 +4,7 @@ if(OGS_BUILD_GUI)
endif()
foreach(tool ${TOOLS})
add_executable(${tool} ${tool}.cpp)
ogs_add_executable(${tool} ${tool}.cpp)
target_link_libraries(${tool} ApplicationsFileIO GitInfoLib MeshLib tclap)
endforeach()
install(TARGETS ${TOOLS} RUNTIME DESTINATION bin)
......@@ -54,7 +54,7 @@ if(OGS_USE_PETSC)
list(REMOVE_ITEM TEST_SOURCES NumLib/TestSerialLinearSolver.cpp)
endif()
add_executable(testrunner ${TEST_SOURCES})
ogs_add_executable(testrunner ${TEST_SOURCES})
target_link_libraries(
testrunner
......
add_executable(xdmfdiff xdmfdiff.cpp)
ogs_add_executable(xdmfdiff xdmfdiff.cpp)
target_link_libraries(xdmfdiff OgsXdmf GitInfoLib std::filesystem tclap)
install(PROGRAMS $<TARGET_FILE:xdmfdiff> DESTINATION bin)
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