Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make executable directory name switchable with exec #448

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ if(BUILD_POSTEXEC)
endif()
endif()

### Switch RUNTIME DESTINATION DIR between bin and exec
set(exec_dir bin)
WenMeng-NOAA marked this conversation as resolved.
Show resolved Hide resolved
if(EMC_EXEC_DIR)
set(exec_dir exec)
endif()

add_subdirectory(sorc)
add_subdirectory(parm)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Builds include:
```
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
make
make test
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
(or cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install -DEMC_EXEC_DIR=ON)
make -j 4
make install
```

Expand Down
4 changes: 2 additions & 2 deletions sorc/ncep_post.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ if(BUILD_POSTEXEC)
target_link_libraries(${EXENAME} PRIVATE
wrf_io::wrf_io)
endif()
install(TARGETS ${EXENAME} RUNTIME DESTINATION bin)
install(TARGETS ${EXENAME} RUNTIME DESTINATION ${exec_dir})
endif()

install(DIRECTORY ${module_dir} DESTINATION ${CMAKE_INSTALL_PREFIX})

install(
TARGETS ${LIBNAME}
EXPORT ${PROJECT_NAME}Exports
RUNTIME DESTINATION bin
RUNTIME DESTINATION ${exec_dir}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)