-
Notifications
You must be signed in to change notification settings - Fork 120
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
Rename dirs and make executable dir switchable to meet NCO standards #216
Changes from all commits
614cd7a
697a8d4
7f8fb28
5452f8f
eaa673a
adff323
5d4776b
eb9b850
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,9 +49,6 @@ ENDFUNCTION() | |
enable_testing() | ||
include(CTest) | ||
|
||
# Build in this subdirectory. | ||
#add_subdirectory(src) | ||
|
||
##### | ||
# Configure and print the ufs-srweather-app.settings file. | ||
##### | ||
|
@@ -91,6 +88,12 @@ SET(host_os "${osrel}") | |
SET(abs_top_builddir "${CMAKE_CURRENT_BINARY_DIR}") | ||
SET(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}") | ||
|
||
# Executable directory name (exec_bin): exec or bin | ||
SET(exec_bin "bin") | ||
IF(EMC_EXEC_DIR) | ||
SET(exec_bin "exec") | ||
ENDIF() | ||
|
||
SET(CC_VERSION "${CMAKE_C_COMPILER}") | ||
|
||
# Set values for .settings file. | ||
|
@@ -119,7 +122,7 @@ MESSAGE(${UFS-SRWEATHER-APP_SETTINGS}) | |
# Install ufs_srweather_app.settings file into same location | ||
# as the app. | ||
INSTALL(FILES "${CMAKE_BINARY_DIR}/ufs_srweather_app.settings" | ||
DESTINATION bin) | ||
DESTINATION ${exec_bin}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use ${CMAKE_INSTALL_BINDIR} |
||
|
||
##### | ||
# Create 'ufs_srweather_app_meta.h' include file. | ||
|
@@ -130,4 +133,4 @@ configure_file( | |
|
||
FILE(COPY "${CMAKE_CURRENT_BINARY_DIR}/ufs_srweather_app_meta.h" DESTINATION include) | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(sorc) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ usage_error () { | |
# default settings | ||
LCL_PID=$$ | ||
SRC_DIR=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )" && pwd -P) | ||
MACHINE_SETUP=${SRC_DIR}/src/UFS_UTILS/sorc/machine-setup.sh | ||
MACHINE_SETUP=${SRC_DIR}/sorc/UFS_UTILS/sorc/machine-setup.sh | ||
BUILD_DIR=${SRC_DIR}/build | ||
INSTALL_DIR=${SRC_DIR} | ||
COMPILER="" | ||
|
@@ -89,12 +89,12 @@ CCPP="" | |
ENABLE_OPTIONS="" | ||
DISABLE_OPTIONS="" | ||
BUILD_TYPE="RELEASE" | ||
BUILD_JOBS=4 | ||
BUILD_JOBS=8 | ||
CLEAN=false | ||
CONTINUE=false | ||
VERBOSE=false | ||
# detect PLATFORM (MACHINE) | ||
source ${SRC_DIR}/env/detect_machine.sh | ||
source ${SRC_DIR}/test/detect_machine.sh | ||
|
||
# process required arguments | ||
if [[ ("$1" == "--help") || ("$1" == "-h") ]]; then | ||
|
@@ -161,7 +161,7 @@ if [ "${VERBOSE}" = true ] ; then | |
fi | ||
|
||
# set ENV_FILE for this platform/compiler combination | ||
ENV_FILE="${SRC_DIR}/env/build_${PLATFORM}_${COMPILER}.env" | ||
ENV_FILE="${SRC_DIR}/modulefiles/build_${PLATFORM}_${COMPILER}.env" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're going to name this directory There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @christopherwharrop-noaa, I agree. This will be my next PR. I don't want to put several topics into one PR. I'll modify the env files into the regular module files in another PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @christopherwharrop-noaa, if you want this change in this PR, I'll do it soon. |
||
if [ ! -f "${ENV_FILE}" ]; then | ||
printf "ERROR: environment file does not exist for platform/compiler\n" >&2 | ||
printf " ENV_FILE=${ENV_FILE}\n" >&2 | ||
|
@@ -210,6 +210,7 @@ fi | |
# cmake settings | ||
CMAKE_SETTINGS="-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}" | ||
CMAKE_SETTINGS="${CMAKE_SETTINGS} -DCMAKE_BUILD_TYPE=${BUILD_TYPE}" | ||
#CMAKE_SETTINGS="${CMAKE_SETTINGS} -DEMC_EXEC_DIR=ON" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead use |
||
if [ ! -z "${APPLICATION}" ]; then | ||
CMAKE_SETTINGS="${CMAKE_SETTINGS} -DAPP=${APPLICATION}" | ||
fi | ||
|
@@ -231,7 +232,7 @@ fi | |
|
||
# source the environment file for this platform/compiler combination, then build the code | ||
printf "... Source ENV_FILE and create BUILD directory ...\n" | ||
module use ${SRC_DIR}/env | ||
module use ${SRC_DIR}/modulefiles | ||
. ${ENV_FILE} | ||
module list | ||
mkdir -p ${BUILD_DIR} | ||
|
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be necessary.