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

adding ufs_srweather_app initial CMakeLists.txt file, and adding build summary #6

Merged
merged 9 commits into from
May 18, 2020

Conversation

edwardhartnett
Copy link
Contributor

Part of #5

In this PR I add the initial CMakeLists.txt file. At the moment it does nothing except generate and print the build summary, but eventually it will do the build. ;-)

The build summary is implemented with a ufs_srweather_app.settings.in file. This file contains lines like this:

SRWA Version:		@SRWA_VERSION@
Configured On:		@CONFIG_DATE@

The fields inside '@" are substituted by cmake. So in our CMakeLists.txt file we have:

# Set extended version info.
SET(SRWA_VERSION_MAJOR 1)
SET(SRWA_VERSION_MINOR 0)
SET(SRWA_VERSION_PATCH 0)
SET(SRWA_VERSION_NOTE "-development")
SET(SRWA_VERSION ${SRWA_VERSION_MAJOR}.${SRWA_VERSION_MINOR}.${SRWA_VERSION_PATCH}${SRWA_VERSION_NOTE})

This results in the following in the settings file shown below. Note that the version info has been substituted into the file:

# UFS Short Range Weather App Configuration Summary
===================================================

# General
---------
SRWA Version:		1.0.0-development
Configured On:		Fri May 15 05:28:30 MDT 2020
Host System:		        x86_64-Linux-5.3.0-51-generic
Build Directory: 	        /home/ed/ufs-srweather-app/build
Install Prefix:                   /usr/local

# Compiling Options
-------------------
C Compiler:		/usr/bin/cc
CFLAGS:			 
CPPFLAGS:		 
LDFLAGS:		 
Shared Library:	no
Static Library:		yes
Extra libraries:	

# Features
----------
Parallel Support:	no

The settings file generated by CMake is called ufs_srweather_app.settings. It is for human use.

There is also a ufs_srweather_app_meta.h file produced, for the use of other programs to understand the build. This file is also automatically generated by CMake. It looks like this:

/*
 * Meta information for ufs-srweather-app which can be used by other
 * packages.
 *
 * This file is automatically generated by the build system
 * at configure time, and contains information related to
 * how ufs-srweather-app was built. It will not be required to
 * include this file unless you want to probe the capabilities
 * of the build. 
 *
 */

#ifndef UFS_SRWEATHER_APP_META_H
#define UFS_SRWEATHER_APP_META_H

#define SRWA_VERSION_MAJOR 1 
#define SRWA_VERSION_MINOR 0 
#define SRWA_VERSION_PATCH 0 
#define SRWA_VERSION_NOTE  "-development"

#define SRWA_VERSION       "1.0.0-development"

#define SRWA_HAS_PARALLEL  0 
#endif

@JulieSchramm JulieSchramm merged commit 7e9a2af into ufs-community:master May 18, 2020
@christinaholtNOAA christinaholtNOAA deleted the ejh_cmake_1 branch December 8, 2021 00:17
JianpingHuang-NOAA pushed a commit to JianpingHuang-NOAA/ufs-srweather-app that referenced this pull request Oct 17, 2022
mark-a-potts pushed a commit that referenced this pull request Dec 13, 2022
update plotting scripts, place map contours on top of the plotted fields
MichaelLueken pushed a commit to MichaelLueken/ufs-srweather-app that referenced this pull request Jan 5, 2024
Update run_vx.local.lua to allow verification tests to run on Orion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants