Skip to content

Commit 7185ffe

Browse files
authored
Merge pull request #1 from DavidMButler/version-4-merge
Merge of version 4.0.0.0 from LPS repository.
2 parents a87269f + eb7ba7e commit 7185ffe

183 files changed

Lines changed: 9810 additions & 5481 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 45 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,28 @@
1414
# limitations under the License.
1515
#
1616

17+
#
18+
# Specify the minimum cmake version.
19+
#
20+
cmake_minimum_required(VERSION 3.5.0)
21+
22+
#
23+
# Make sure if() treats constants like TRUE as constants
24+
# rather than implicitly treating them as variables and trying to dereference them.
25+
26+
cmake_policy(SET CMP0012 NEW)
27+
28+
#
29+
# Set the cmake module path.
30+
#
31+
set(SHEAFSYSTEM_CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules"
32+
CACHE STRING "Location of Sheaf System Cmake modules")
33+
mark_as_advanced(FORCE SHEAFSYSTEM_CMAKE_MODULE_PATH)
34+
35+
# Make the requires and ensures functions available.
36+
37+
include(${SHEAFSYSTEM_CMAKE_MODULE_PATH}/design_by_contract.cmake)
38+
1739
# Setting CMAKE_CONFIGURATION_TYPES prior to the project function call
1840
# will eliminate the default configuration types (debug,release,RelWithDebugInfo, et al.) --
1941
# or at least stop them from appearing in the VS configuration list.
@@ -22,116 +44,69 @@
2244

2345
if(WIN32)
2446
set(CMAKE_CONFIGURATION_TYPES Debug_contracts Debug_no_contracts Release_contracts Release_no_contracts
25-
RelWithDebInfo_contracts RelWithDebInfo_no_contracts CACHE STRING "Supported configuration types"
26-
FORCE)
47+
RelWithDebInfo_contracts RelWithDebInfo_no_contracts
48+
CACHE STRING "Supported configuration types" FORCE)
49+
mark_as_advanced(FORCE CMAKE_CONFIGURATION_TYPES)
2750
else()
2851
set(CMAKE_CONFIGURATION_TYPES Debug_contracts Debug_no_contracts Release_contracts Release_no_contracts
29-
CACHE STRING "Supported configuration types"
30-
FORCE)
52+
CACHE STRING "Supported configuration types" FORCE)
53+
mark_as_advanced(FORCE CMAKE_CONFIGURATION_TYPES)
3154
endif()
3255

3356
#
3457
# Establish the project name
3558
#
3659
project(SheafSystem)
3760

38-
#
39-
# Specify the minimum cmake version.
40-
#
41-
cmake_minimum_required(VERSION 2.8.12)
42-
4361
#
4462
# Include variable definitions and functions
4563
# unique to and/or required at the system level.
4664
#
4765
include(system_definitions.cmake)
48-
49-
#
50-
# Add components to the system
51-
#
52-
add_components()
66+
SheafSystem_make_system_definitions()
5367

5468
#
5569
# Set up output directories
5670
#
57-
create_output_dirs()
71+
SheafSystem_create_output_dirs()
5872

5973
#
60-
# Add the documentation targets (doc, docclean)
61-
# Doc targets are system level and system scope.
62-
# currently there is no notion of building a single
63-
# component's documentation.
64-
#
65-
add_doc_targets()
66-
67-
#
68-
# Install the documentation
74+
# Add components to the system
6975
#
70-
if(INSTALL_DOCS)
71-
install_docs()
72-
endif()
76+
SheafSystem_add_components()
7377

7478
#
75-
# Target to generate emacs tags
79+
# Add all the system level targets.
7680
#
77-
add_tags_target()
81+
include(${SHEAFSYSTEM_CMAKE_MODULE_PATH}/target_declarations.cmake)
82+
SheafSystem_add_system_targets()
7883

7984
#
80-
# Configure the environment scripts.
85+
# Configure the environment variable scripts.
8186
#
82-
if(LINUX64GNU OR LINUX64INTEL)
83-
configure_file(${CMAKE_MODULE_PATH}/set_env_vars.csh.cmake.in ${CMAKE_BINARY_DIR}/set_env_vars.csh)
84-
configure_file(${CMAKE_MODULE_PATH}/set_env_vars.sh.cmake.in ${CMAKE_BINARY_DIR}/set_env_vars.sh)
85-
endif()
86-
87-
#
88-
# System level is responsible for installing the documentation. The component list (see system_definitions.cmake)
89-
# determines what components are included in the docs.
90-
# NOTE: Prepending of ${CMAKE_INSTALL_PREFIX}/ to the value of DESTINATION is implicit in the install command.
91-
# You need only specify the sub-directory within ${CMAKE_INSTALL_PREFIX}, cmake will create the dir.
92-
# With no value specified for DESTINATION, all files are placed in ${CMAKE_INSTALL_PREFIX}.
93-
#
94-
if(INSTALL_DOCS)
95-
install(DIRECTORY ${CMAKE_BINARY_DIR}/documentation/ DESTINATION documentation)
87+
if(SHEAFSYSTEM_LINUX)
88+
configure_file(${SHEAFSYSTEM_CMAKE_MODULE_PATH}/set_env_vars.csh.cmake.in ${CMAKE_BINARY_DIR}/set_env_vars.csh)
89+
configure_file(${SHEAFSYSTEM_CMAKE_MODULE_PATH}/set_env_vars.sh.cmake.in ${CMAKE_BINARY_DIR}/set_env_vars.sh)
9690
endif()
9791

9892
#
9993
# Generate the install configuration file.
10094
#
101-
generate_install_config_file()
95+
SheafSystem_generate_install_config_files()
10296

10397
#
10498
# Install HDF5 headers to <include> dir
10599
#
106-
install_prereqs()
100+
SheafSystem_install_prereqs()
107101

108102
#
109-
# Install the exports file
103+
# Install the documentation.
110104
#
111-
if(LINUX64INTEL OR LINUX64GNU)
112-
install(FILES ${PROJECT_BINARY_DIR}/${EXPORTS_FILE}.in DESTINATION ${CMAKE_BUILD_TYPE}/config)
113-
else()
114-
install(FILES ${PROJECT_BINARY_DIR}/${EXPORTS_FILE}.in DESTINATION config/\${BUILD_TYPE})
105+
if(SHEAFSYSTEM_INSTALL_DOCS)
106+
SheafSystem_install_documentation()
115107
endif()
116108

117109
#
118-
# Markup the RELEASE_NOTES file.
119-
#
120-
set(RELEASE_DATE)
121-
get_date(RELEASE_DATE)
122-
123-
#
124-
# Generate some info about the release
110+
# Install the release notes.
125111
#
126-
file(WRITE ${CMAKE_BINARY_DIR}/VERSION "${PROJECT_NAME} version ${LIB_VERSION} ${RELEASE_DATE} \n")
127-
install(FILES ${PROJECT_BINARY_DIR}/VERSION DESTINATION ${CMAKE_INSTALL_PREFIX})
128-
129-
configure_file(${CMAKE_SOURCE_DIR}/RELEASE_NOTES.in ${CMAKE_BINARY_DIR}/RELEASE_NOTES)
130-
131-
#if(TARGET install)
132-
if(LINUX64GNU OR LINUX64INTEL)
133-
install(FILES ${CMAKE_BINARY_DIR}/RELEASE_NOTES DESTINATION ${CMAKE_INSTALL_PREFIX})
134-
else()
135-
install(FILES ${CMAKE_BINARY_DIR}/RELEASE_NOTES DESTINATION ${CMAKE_INSTALL_PREFIX} RENAME RELEASE_NOTES.txt)
136-
endif()
137-
#endif()
112+
SheafSystem_install_release_notes()

README-Linux.docx

56.1 KB
Binary file not shown.

README-Linux.htm

118 KB
Binary file not shown.

README-Windows.docx

57.9 KB
Binary file not shown.

README-Windows.htm

105 KB
Binary file not shown.

README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

RELEASE_NOTES.in

Lines changed: 0 additions & 33 deletions
This file was deleted.

cmake_modules/FindCSharp.cmake

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
# Copyright (c) 2006-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
3131
#
3232

33-
# TODO: ADD ABILITY TO SELECT WHICH C# COMPILER eg. .NET or Mono (if both exist). For the moment, .NET is selected above Mono.
33+
# TODO: ADD ABILITY TO SELECT WHICH C# COMPILER eg. .NET or Mono (if both exist).
34+
# For the moment, .NET is selected above Mono.
3435

3536
# Make sure find package macros are included
37+
3638
include( FindPackageHandleStandardArgs )
3739

3840
unset( CSHARP_COMPILER CACHE )
@@ -42,36 +44,50 @@ unset( CSHARP_VERSION CACHE )
4244
unset( CSHARP_FOUND CACHE )
4345

4446
# By default use anycpu platform, allow the user to override
47+
4548
set( CSHARP_PLATFORM "anycpu" CACHE STRING "C# target platform: x86, x64, anycpu, or itanium" )
49+
4650
if( NOT ${CSHARP_PLATFORM} MATCHES "x86|x64|anycpu|itanium" )
47-
message( FATAL_ERROR "The C# target platform '${CSHARP_PLATFORM}' is not valid. Please enter one of the following: x86, x64, anycpu, or itanium" )
51+
52+
message( FATAL_ERROR "The C# target platform '${CSHARP_PLATFORM}' is not valid. Please enter one of the following: x86, x64, anycpu, or itanium" )
53+
4854
endif( )
49-
if( WIN32 )
50-
find_package( DotNetFrameworkSdk )
51-
if( NOT CSHARP_DOTNET_FOUND )
52-
find_package( Mono )
53-
endif( )
54-
else( UNIX )
55-
#find_package( Mono )
56-
FIND_PROGRAM(MONO_COMPILER mcs)
57-
if(MONO_COMPILER)
58-
set(CSHARP_MONO_FOUND TRUE)
55+
56+
if(SHEAFSYSTEM_WINDOWS)
57+
58+
find_package(DotNetFrameworkSdk)
59+
60+
set( CSHARP_FOUND ${CSHARP_DOTNET_FOUND} CACHE BOOL "True if CSharp package found." FORCE)
61+
62+
if( CSHARP_DOTNET_FOUND )
63+
64+
set(CSHARP_TYPE ".NET" CACHE STRING "Using the .NET compiler")
65+
set(CSHARP_VERSION ${CSHARP_DOTNET_VERSION} CACHE STRING "C# .NET compiler version" FORCE)
66+
set(CSHARP_COMPILER ${CSHARP_DOTNET_COMPILER_${CSHARP_DOTNET_VERSION}}
67+
CACHE STRING "Full path to .NET compiler" FORCE)
68+
set(CSHARP_INTERPRETER "" CACHE INTERNAL "" FORCE)
69+
70+
if (CSHARP_COMPILER MATCHES "bat")
71+
set( CSHARP_COMPILER "call ${CSHARP_COMPILER}")
72+
endif()
73+
5974
endif()
60-
endif( )
75+
76+
elseif(SHEAFSYSTEM_LINUX)
77+
78+
find_program(MCS_EXECUTABLE mcs)
79+
80+
if(MCS_EXECUTABLE)
6181

62-
if( CSHARP_DOTNET_FOUND )
63-
set( CSHARP_TYPE ".NET" CACHE STRING "Using the .NET compiler" )
64-
set( CSHARP_VERSION ${CSHARP_DOTNET_VERSION} CACHE STRING "C# .NET compiler version" FORCE )
65-
set( CSHARP_COMPILER ${CSHARP_DOTNET_COMPILER_${CSHARP_DOTNET_VERSION}} CACHE STRING "Full path to .NET compiler" FORCE )
66-
set( CSHARP_INTERPRETER "" CACHE INTERNAL "" FORCE )
67-
elseif( CSHARP_MONO_FOUND )
68-
set( CSHARP_TYPE "Mono" CACHE STRING "Using the Mono compiler" )
69-
set( CSHARP_COMPILER ${MONO_COMPILER} CACHE STRING "Full path to Mono compiler" FORCE )
70-
endif( )
82+
set(CSHARP_MONO_FOUND TRUE)
83+
set(CSHARP_TYPE "Mono" CACHE STRING "Using the Mono compiler")
84+
set(CSHARP_COMPILER ${MCS_EXECUTABLE} CACHE STRING "Full path to Mono compiler" FORCE)
85+
set(CSHARP_FOUND TRUE CACHE BOOL "True if CSharp package found." FORCE)
7186

72-
# Handle WIN32 specific issues
73-
if ( WIN32 )
74-
if ( CSHARP_COMPILER MATCHES "bat" )
75-
set( CSHARP_COMPILER "call ${CSHARP_COMPILER}" )
76-
endif ( )
77-
endif( )
87+
else()
88+
89+
set( CSHARP_FOUND FALSE CACHE BOOL "True if CSharp package found." FORCE)
90+
91+
endif()
92+
93+
endif()

cmake_modules/FindJMF.cmake

Lines changed: 0 additions & 45 deletions
This file was deleted.

cmake_modules/FindMONO.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
# BSD license.
3232
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
3333
#
34+
35+
# OBSOLETE. NO LONGER USED.
36+
3437
SET(MONO_FOUND FALSE)
3538

3639
FIND_PROGRAM(MONO_EXECUTABLE mono PATHS /usr/bin)

0 commit comments

Comments
 (0)