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

Added QMPConfig.cmake to help cmake builds. Modified Makefile.am to i… #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
64 changes: 21 additions & 43 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,43 +1,21 @@
Parts of the code fall under the copyright below:
-----------------------------------------------------------------------------------
COPYRIGHT AND LICENSE

Copyright (c) 1995,1996 Southeastern Universities Research Association
Continuous Electron Beam Accelerator Facility
Thomas Jefferson National Accelerator Facility
12000 Jefferson Avenue, Newport News, VA 23606

This material resulted from work developed under a United States Government
Contract and is subject to the following license:

The Government retains a paid-up, nonexclusive, irrevocable worldwide license
to reproduce, prepare derivative works, perform publicly and display publicly
by or for the Government including the right to distribute to other Government
contractors.


DISCLAIMER AND LIMITATION OF WARRANTY.

ALL SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY. THERE
ARE NO WARRANTIES EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. THERE IS NO WARRANTY THAT USE WILL NOT INFRINGE
ANY PATENT, COPYRIGHT OR TRADEMARK.

In consideration of the use of the software and other materials, user agrees
that neither the Government nor SURA/TJNAF will be liable for any damages with
respect to such use, and user shall hold both the Government and SURA/TJNAF
harmless from and indemnify them against any and all liability for damages
arising out of the use of such software and other materials. In no event shall
the Government or SURA/TJNAF be liable whether arising under contract, tort,
strict liability or otherwise for any incidental, indirect or consequential
loss or damage of any nature arising at any time from any cause whatsoever. In
addition, the Government and SURA/TJNAF assume no obligation for defending
against third party claims or threats of claims arising as a result of user's
use of the software or materials either as delivered to user or as modified by
user.

-----------------------------------------------------------------------------------

Other parts are copyrighted by their respective contributors, but are
distributed under the same license.
This package contains code from several contributors at several institutions each of whom retain copyright to the code. For ease of distribution, especially to 3rd parties, we license the code subject to the 3-part BSD-like license below. Copyright statements and any other licensing terms from the other authors will be added below as they are received and as is appropriate.

LICENSE:
========

Jefferson Science Associates LLC Copyright Notice:

Copyright � 2018 Jefferson Science Associates LLC All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted as a licensed user provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

This material resulted from work developed under a United States Government
Contract. The Government retains a paid-up, nonexclusive, irrevocable worldwide license in such copyrighted data to reproduce, distribute copies to the public, prepare derivative works, perform publicly and display publicly and to permit others to do so.
THIS SOFTWARE IS PROVIDED BY JEFFERSON SCIENCE ASSOCIATES LLC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JEFFRSON SCIENCE ASSOCIATES, LLC OR THE U.S. GOVERNMENT BE LIABLE TO LICENSEE OR ANY THIRD PARTES FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This package contains code from several contributors at several institutions each of whom retain copyright to the code. For ease of distribution, especially to 3rd parties, we license the code subject to the 3-part BSD-like license below. Copyright statements and any other licensing terms from the other authors will be added below as they are received and as is appropriate.

LICENSE:
========

Jefferson Science Associates LLC Copyright Notice:

Copyright � 2018 Jefferson Science Associates LLC All Rights Reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted as a licensed user provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.

This material resulted from work developed under a United States Government
Contract. The Government retains a paid-up, nonexclusive, irrevocable worldwide license in such copyrighted data to reproduce, distribute copies to the public, prepare derivative works, perform publicly and display publicly and to permit others to do so.
THIS SOFTWARE IS PROVIDED BY JEFFERSON SCIENCE ASSOCIATES LLC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JEFFRSON SCIENCE ASSOCIATES, LLC OR THE U.S. GOVERNMENT BE LIABLE TO LICENSEE OR ANY THIRD PARTES FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

13 changes: 13 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ SUBDIRS = include lib bin examples doc

DISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@

# QMPConfig.cmake is a file, that a CMake system
# Can use to find out about the QMP Installation
# It is not configured by autoconf and just
# needs to be included in the root of the qmp installation
#
# This adds the file, so make dist will pick it up
EXTRA_DIST = QMPConfig.cmake

# THese two lines will install the file in the target directory
cmakeconfdir = $(prefix)
cmakeconf_DATA = QMPConfig.cmake


#
# User explicitly has to make docs -- you may not want them
#
Expand Down
48 changes: 48 additions & 0 deletions QMPConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
# Attempt at a dumb config file for QMP
#
#

# Find the qmp-config program to populate teh various
# variables
find_program(QMP_CONFIG NAMES qmp-config)

# If not found Error and exit
if( NOT QMP_CONFIG )
message(FATAL_ERROR "qmp-config not found")
endif( NOT QMP_CONFIG)


message(STATUS "Found qmp-config: ${QMP_CONFIG}")

# Get Compiler
execute_process(COMMAND ${QMP_CONFIG} --cc
OUTPUT_VARIABLE QMP_C_COMPILER OUTPUT_STRIP_TRAILING_WHITESPACE )
message(STATUS "QMP C Compiler is: ${QMP_C_COMPILER}")

# Get CFLAGS
execute_process(COMMAND ${QMP_CONFIG} --copts
OUTPUT_VARIABLE QMP_C_COMPILE_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE )
message(STATUS "QMP CFLAGS are: ${QMP_C_COMPILE_FLAGS}")

# Get LDFLAGS
execute_process(COMMAND ${QMP_CONFIG} --ldflags
OUTPUT_VARIABLE QMP_C_LINK_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE )
message(STATUS "QMP LDFLAGS are: ${QMP_C_LINK_FLAGS}")

# Get LIBS
execute_process(COMMAND ${QMP_CONFIG} --libs
OUTPUT_VARIABLE QMP_C_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE )
message(STATUS "QMP LIBS are: ${QMP_C_LIBRARIES}")

#Turn the various strings into lists for appending
separate_arguments(QMP_C_COMPILE_FLAGS)
separate_arguments(QMP_C_LINK_FLAGS)
separate_arguments(QMP_C_LIBRARIES)

# Find the include path by looking for the path containing qmp.h
find_path(QMP_C_INCLUDE_PATH qmp.h)
message(STATUS "QMP Include path is: ${QMP_C_INCLUDE_PATH}")

# OK, we are done
set ( QMP_C_FOUND TRUE )