forked from AMReX-Codes/amrex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: allow user to build and install plotfile tools. Fixes issue AM…
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
project(AMReX-PlotfileTools | ||
DESCRIPTION "AMReX tools to postprocess plot files" | ||
) | ||
|
||
# Plotfile tools requires only AMReX sources from Src/Base which get always | ||
# compiled, so no need to check which part of AMReX is enabled by user | ||
|
||
|
||
# General Target to build all tools at once | ||
add_custom_target(plotfile_tools) | ||
|
||
set(_exe_names | ||
fboxinfo | ||
fcompare | ||
fextract | ||
fextrema | ||
fnan | ||
fsnapshot | ||
ftime | ||
fvarnames | ||
) | ||
|
||
# Build targets one by one | ||
foreach( _exe IN LISTS _exe_names) | ||
add_executable(${_exe} ${_exe}.cpp) | ||
target_link_libraries(${_exe} PRIVATE amrex) | ||
add_dependencies(plotfile_tools ${_exe}) | ||
endforeach() | ||
|
||
|
||
# target snapshot needs a special treatment | ||
target_include_directories(fsnapshot PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) | ||
target_sources(fsnapshot PRIVATE AMReX_PPMUtil.H AMReX_PPMUtil.cpp) | ||
|
||
# Installation | ||
install(TARGETS ${_exe_names} RUNTIME DESTINATION bin) |