summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--CMakeCPack.cmake25
-rw-r--r--CTestCustom.cmake.in1
-rw-r--r--Help/command/cmake_parse_arguments.rst11
-rw-r--r--Help/command/separate_arguments.rst12
-rw-r--r--Help/command/string.rst2
-rw-r--r--Help/release/dev/bzip2-imported-targets.rst4
-rw-r--r--Help/release/dev/cmake-gui-open-project.rst5
-rw-r--r--Help/release/dev/parse_arguments_argv_n.rst6
-rw-r--r--Help/release/dev/timestamp-names.rst6
-rw-r--r--Help/release/dev/wix-feature-patch.rst5
-rw-r--r--Modules/CPackWIX.cmake2
-rw-r--r--Modules/FindBZip2.cmake36
-rw-r--r--Modules/GetPrerequisites.cmake4
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx4
-rw-r--r--Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx12
-rw-r--r--Source/CPack/WiX/cmWIXFeaturesSourceWriter.h7
-rw-r--r--Source/CPack/cygwin.readme69
-rw-r--r--Source/CTest/cmCTestSVN.cxx17
-rw-r--r--Source/CTest/cmCTestSVN.h2
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx37
-rw-r--r--Source/QtDialog/CMakeSetupDialog.h2
-rw-r--r--Source/QtDialog/CMakeSetupDialog.ui7
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx13
-rw-r--r--Source/cmDependsFortran.cxx7
-rw-r--r--Source/cmFileCommand.cxx10
-rw-r--r--Source/cmFortranLexer.cxx477
-rw-r--r--Source/cmFortranLexer.h2
-rw-r--r--Source/cmFortranLexer.in.l6
-rw-r--r--Source/cmFortranParser.cxx462
-rw-r--r--Source/cmFortranParser.y95
-rw-r--r--Source/cmFortranParserTokens.h16
-rw-r--r--Source/cmGeneratorTarget.cxx32
-rw-r--r--Source/cmGeneratorTarget.h2
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx4
-rw-r--r--Source/cmLocalGenerator.cxx21
-rw-r--r--Source/cmParseArgumentsCommand.cxx57
-rw-r--r--Source/cmSystemTools.cxx20
-rw-r--r--Source/cmTimestamp.cxx2
-rw-r--r--Source/cmake.cxx57
-rw-r--r--Source/cmake.h10
-rwxr-xr-xTemplates/cygwin-package.sh.in103
-rw-r--r--Tests/CMakeLists.txt10
-rw-r--r--Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake11
-rw-r--r--Tests/CMakeTests/StringTest.cmake.in3
-rw-r--r--Tests/FindBZip2/CMakeLists.txt10
-rw-r--r--Tests/FindBZip2/Test/CMakeLists.txt16
-rw-r--r--Tests/FindBZip2/Test/main.c23
-rw-r--r--Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake67
-rw-r--r--Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt1
-rw-r--r--Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt1
-rw-r--r--Tests/RunCMake/GenerateExportHeader/GEH.cmake2
-rw-r--r--Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake10
-rw-r--r--Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp138
-rw-r--r--Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp65
-rw-r--r--Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h85
-rw-r--r--Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp65
-rw-r--r--Tests/RunCMake/GenerateExportHeader/libshared/libshared.h71
-rw-r--r--Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp68
-rw-r--r--Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h75
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake30
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN1-result.txt1
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake4
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN2-result.txt1
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt5
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake4
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN3-result.txt1
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake1
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN4-result.txt1
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt4
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake3
-rw-r--r--Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt (renamed from Utilities/Release/Cygwin/cygwin-patch.diff.in)0
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt5
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake5
-rw-r--r--Tests/RunCMake/file/DOWNLOAD-unused-argument.txt0
-rw-r--r--Tests/RunCMake/file/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/file/UPLOAD-unused-argument-result.txt0
-rw-r--r--Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt5
-rw-r--r--Tests/RunCMake/file/UPLOAD-unused-argument.cmake5
-rw-r--r--Tests/RunCMake/file/UPLOAD-unused-argument.txt0
-rw-r--r--Utilities/KWIML/Copyright.txt2
-rw-r--r--Utilities/KWIML/include/kwiml/abi.h6
-rw-r--r--Utilities/KWIML/include/kwiml/int.h2
-rw-r--r--Utilities/KWIML/src/version.h.in2
-rw-r--r--Utilities/Release/Cygwin/CMakeLists.txt25
-rw-r--r--Utilities/Release/Cygwin/README.cygwin.in42
-rwxr-xr-xUtilities/Release/Cygwin/cygwin-package.sh.in90
-rw-r--r--Utilities/Release/Cygwin/cygwin-setup.hint.in5
-rw-r--r--Utilities/Release/README3
-rw-r--r--Utilities/Release/create-cmake-release.cmake1
-rw-r--r--Utilities/Release/cygwin_release.cmake32
-rw-r--r--Utilities/Release/release_cmake.cmake4
-rwxr-xr-xUtilities/Scripts/update-kwiml.bash2
-rw-r--r--Utilities/cmlibuv/CMakeLists.txt9
98 files changed, 1503 insertions, 1213 deletions
diff --git a/.gitignore b/.gitignore
index 0d09cdc..5d1732d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,7 @@
# Exclude MacOS Finder files.
.DS_Store
+
+*.user*
+
+*.pyc
+Testing
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 4d7c6fd..47bb7cf 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -190,31 +190,6 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake")
endif()
- # cygwin specific packaging stuff
- if(CYGWIN)
- # setup the cygwin package name
- set(CPACK_PACKAGE_NAME cmake)
- # setup the name of the package for cygwin cmake-2.4.3
- set(CPACK_PACKAGE_FILE_NAME
- "${CPACK_PACKAGE_NAME}-${CMake_VERSION}")
- # the source has the same name as the binary
- set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME})
- # Create a cygwin version number in case there are changes for cygwin
- # that are not reflected upstream in CMake
- set(CPACK_CYGWIN_PATCH_NUMBER 1 CACHE STRING "patch number for CMake cygwin packages")
- mark_as_advanced(CPACK_CYGWIN_PATCH_NUMBER)
- # These files are required by the cmCPackCygwinSourceGenerator and the files
- # put into the release tar files.
- set(CPACK_CYGWIN_BUILD_SCRIPT
- "${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.sh")
- set(CPACK_CYGWIN_PATCH_FILE
- "${CMake_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.patch")
- # include the sub directory cmake file for cygwin that
- # configures some files and adds some install targets
- # this file uses some of the package file name variables
- include(Utilities/Release/Cygwin/CMakeLists.txt)
- endif()
-
set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991")
if(MSVC AND NOT "$ENV{WIX}" STREQUAL "")
diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in
index 1699492..8489178 100644
--- a/CTestCustom.cmake.in
+++ b/CTestCustom.cmake.in
@@ -81,6 +81,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"index_encoder.c.241.2. warning: Value stored to .out_start. is never read"
"index.c.*warning: Access to field.*results in a dereference of a null pointer.*loaded from variable.*"
"cm_sha2.*warning: Value stored to.*is never read"
+ "cmFortranLexer.cxx:[0-9]+:[0-9]+: warning: Call to 'realloc' has an allocation size of 0 bytes"
"testProcess.*warning: Dereference of null pointer .loaded from variable .invalidAddress.."
"liblzma/simple/x86.c:[0-9]+:[0-9]+: warning: The result of the '<<' expression is undefined"
"libuv/src/.*:[0-9]+:[0-9]+: warning: Dereference of null pointer"
diff --git a/Help/command/cmake_parse_arguments.rst b/Help/command/cmake_parse_arguments.rst
index 6206611..ec4ffed 100644
--- a/Help/command/cmake_parse_arguments.rst
+++ b/Help/command/cmake_parse_arguments.rst
@@ -11,6 +11,17 @@ respective options.
cmake_parse_arguments(<prefix> <options> <one_value_keywords>
<multi_value_keywords> args...)
+ cmake_parse_arguments(PARSE_ARGV N <prefix> <options> <one_value_keywords>
+ <multi_value_keywords>)
+
+The first signature reads processes arguments passed in the ``args...``.
+This may be used in either a :command:`macro` or a :command:`function`.
+
+The ``PARSE_ARGV`` signature is only for use in a :command:`function`
+body. In this case the arguments that are parsed come from the
+``ARGV#`` variables of the calling function. The parsing starts with
+the Nth argument, where ``N`` is an unsigned integer. This allows for
+the values to have special characters like ``;`` in them.
The ``<options>`` argument contains all options for the respective macro,
i.e. keywords which can be used when calling the macro without any value
diff --git a/Help/command/separate_arguments.rst b/Help/command/separate_arguments.rst
index 0e3e5a5..1fd3cd1 100644
--- a/Help/command/separate_arguments.rst
+++ b/Help/command/separate_arguments.rst
@@ -13,19 +13,21 @@ entire command line must be given in one "<args>" argument.
The ``UNIX_COMMAND`` mode separates arguments by unquoted whitespace. It
recognizes both single-quote and double-quote pairs. A backslash
-escapes the next literal character (\" is "); there are no special
-escapes (\n is just n).
+escapes the next literal character (``\"`` is ``"``); there are no special
+escapes (``\n`` is just ``n``).
The ``WINDOWS_COMMAND`` mode parses a windows command-line using the same
syntax the runtime library uses to construct argv at startup. It
separates arguments by whitespace that is not double-quoted.
Backslashes are literal unless they precede double-quotes. See the
-MSDN article "Parsing C Command-Line Arguments" for details.
+MSDN article `Parsing C Command-Line Arguments`_ for details.
+
+.. _`Parsing C Command-Line Arguments`: https://msdn.microsoft.com/library/a1y7w461.aspx
::
- separate_arguments(VARIABLE)
+ separate_arguments(<var>)
-Convert the value of ``VARIABLE`` to a semi-colon separated list. All
+Convert the value of ``<var>`` to a semi-colon separated list. All
spaces are replaced with ';'. This helps with generating command
lines.
diff --git a/Help/command/string.rst b/Help/command/string.rst
index 19a095a..8028333 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -278,12 +278,14 @@ specifiers:
%I The hour on a 12-hour clock (01-12).
%j The day of the current year (001-366).
%m The month of the current year (01-12).
+ %b Abbreviated month name (e.g. Oct).
%M The minute of the current hour (00-59).
%s Seconds since midnight (UTC) 1-Jan-1970 (UNIX time).
%S The second of the current minute.
60 represents a leap second. (00-60)
%U The week number of the current year (00-53).
%w The day of the current week. 0 is Sunday. (0-6)
+ %a Abbreviated weekday name (e.g. Fri).
%y The last two digits of the current year (00-99)
%Y The current year.
diff --git a/Help/release/dev/bzip2-imported-targets.rst b/Help/release/dev/bzip2-imported-targets.rst
new file mode 100644
index 0000000..be58b96
--- /dev/null
+++ b/Help/release/dev/bzip2-imported-targets.rst
@@ -0,0 +1,4 @@
+bzip2-imported-targets
+----------------------
+
+* The :module:`FindBZip2` module now provides imported targets.
diff --git a/Help/release/dev/cmake-gui-open-project.rst b/Help/release/dev/cmake-gui-open-project.rst
new file mode 100644
index 0000000..32f0f0f
--- /dev/null
+++ b/Help/release/dev/cmake-gui-open-project.rst
@@ -0,0 +1,5 @@
+cmake-gui-open-project
+----------------------
+
+* :manual:`cmake-gui(1)` gained a button to open the generated project file
+ for :ref:`Visual Studio Generators` and the :generator:`Xcode` generator.
diff --git a/Help/release/dev/parse_arguments_argv_n.rst b/Help/release/dev/parse_arguments_argv_n.rst
new file mode 100644
index 0000000..758b72a
--- /dev/null
+++ b/Help/release/dev/parse_arguments_argv_n.rst
@@ -0,0 +1,6 @@
+parse_arguments_argv_n
+----------------------
+
+* The :command:`cmake_parse_arguments` command gained a new
+ mode to read arguments directly from ``ARGC`` and ``ARGV#``
+ variables inside a :command:`function` body.
diff --git a/Help/release/dev/timestamp-names.rst b/Help/release/dev/timestamp-names.rst
new file mode 100644
index 0000000..ea54b5c
--- /dev/null
+++ b/Help/release/dev/timestamp-names.rst
@@ -0,0 +1,6 @@
+timestamp-names
+---------------
+
+* The :command:`string(TIMESTAMP)` and :command:`file(TIMESTAMP)`
+ commands gained support for the ``%a`` and ``%b`` placeholders.
+ These are the abbreviated weekday and month names.
diff --git a/Help/release/dev/wix-feature-patch.rst b/Help/release/dev/wix-feature-patch.rst
new file mode 100644
index 0000000..0b1cbe3
--- /dev/null
+++ b/Help/release/dev/wix-feature-patch.rst
@@ -0,0 +1,5 @@
+wix-feature-patch
+-----------------
+
+* The CPack WIX generator now supports
+ CPACK_WIX_PATCH_FILE fragments for Feature elements.
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake
index 08ff0cb..d02df2d 100644
--- a/Modules/CPackWIX.cmake
+++ b/Modules/CPackWIX.cmake
@@ -147,7 +147,7 @@
# }
#
# Currently fragments can be injected into most
-# Component, File and Directory elements.
+# Component, File, Directory and Feature elements.
#
# The following additional special Ids can be used:
#
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index b670025..152d812 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -4,7 +4,16 @@
#
# Try to find BZip2
#
-# Once done this will define
+# IMPORTED Targets
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines :prop_tgt:`IMPORTED` target ``BZip2::BZip2``, if
+# BZip2 has been found.
+#
+# Result Variables
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines the following variables:
#
# ::
#
@@ -64,6 +73,31 @@ if (BZIP2_FOUND)
set(CMAKE_REQUIRED_LIBRARIES ${BZIP2_LIBRARIES})
CHECK_SYMBOL_EXISTS(BZ2_bzCompressInit "bzlib.h" BZIP2_NEED_PREFIX)
cmake_pop_check_state()
+
+ if(NOT TARGET BZip2::BZip2)
+ add_library(BZip2::BZip2 UNKNOWN IMPORTED)
+ set_target_properties(BZip2::BZip2 PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${BZIP2_INCLUDE_DIRS}")
+
+ if(BZIP2_LIBRARY_RELEASE)
+ set_property(TARGET BZip2::BZip2 APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(BZip2::BZip2 PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${BZIP2_LIBRARY_RELEASE}")
+ endif()
+
+ if(BZIP2_LIBRARY_DEBUG)
+ set_property(TARGET BZip2::BZip2 APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(BZip2::BZip2 PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${BZIP2_LIBRARY_DEBUG}")
+ endif()
+
+ if(NOT BZIP2_LIBRARY_RELEASE AND NOT BZIP2_LIBRARY_DEBUG)
+ set_property(TARGET BZip2::BZip2 APPEND PROPERTY
+ IMPORTED_LOCATION "${BZIP2_LIBRARY}")
+ endif()
+ endif()
endif ()
mark_as_advanced(BZIP2_INCLUDE_DIR)
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 58f5a92..127fda2 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -544,7 +544,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
string(TOLOWER "$ENV{windir}" windir)
file(TO_CMAKE_PATH "${windir}" windir)
- if(lower MATCHES "^(api-ms-win-|${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*msvc[^/]+dll)")
+ if(lower MATCHES "^(${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*(msvc|api-ms-win-)[^/]+dll)")
set(is_system 1)
endif()
@@ -572,7 +572,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
string(TOLOWER "${env_windir}" windir)
string(TOLOWER "${env_sysdir}" sysroot)
- if(lower MATCHES "^(api-ms-win-|${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*msvc[^/]+dll)")
+ if(lower MATCHES "^(${sysroot}/sys(tem|wow)|${windir}/sys(tem|wow)|(.*/)*(msvc|api-ms-win-)[^/]+dll)")
set(is_system 1)
endif()
endif()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 74f34b2..c61ef42 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 6)
-set(CMake_VERSION_PATCH 20160908)
+set(CMake_VERSION_PATCH 20160914)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 85e0ae3..ba5787e 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -628,7 +628,7 @@ bool cmCPackWIXGenerator::CreateFeatureHierarchy(
i != ComponentGroups.end(); ++i) {
cmCPackComponentGroup const& group = i->second;
if (group.ParentGroup == 0) {
- featureDefinitions.EmitFeatureForComponentGroup(group);
+ featureDefinitions.EmitFeatureForComponentGroup(group, *this->Patch);
}
}
@@ -638,7 +638,7 @@ bool cmCPackWIXGenerator::CreateFeatureHierarchy(
cmCPackComponent const& component = i->second;
if (!component.Group) {
- featureDefinitions.EmitFeatureForComponent(component);
+ featureDefinitions.EmitFeatureForComponent(component, *this->Patch);
}
}
diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx
index 7794935..c9f17cc 100644
--- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx
@@ -42,7 +42,7 @@ void cmWIXFeaturesSourceWriter::CreateCMakePackageRegistryEntry(
}
void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup(
- cmCPackComponentGroup const& group)
+ cmCPackComponentGroup const& group, cmWIXPatch& patch)
{
BeginElement("Feature");
AddAttribute("Id", "CM_G_" + group.Name);
@@ -57,20 +57,22 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponentGroup(
for (std::vector<cmCPackComponentGroup*>::const_iterator i =
group.Subgroups.begin();
i != group.Subgroups.end(); ++i) {
- EmitFeatureForComponentGroup(**i);
+ EmitFeatureForComponentGroup(**i, patch);
}
for (std::vector<cmCPackComponent*>::const_iterator i =
group.Components.begin();
i != group.Components.end(); ++i) {
- EmitFeatureForComponent(**i);
+ EmitFeatureForComponent(**i, patch);
}
+ patch.ApplyFragment("CM_G_" + group.Name, *this);
+
EndElement("Feature");
}
void cmWIXFeaturesSourceWriter::EmitFeatureForComponent(
- cmCPackComponent const& component)
+ cmCPackComponent const& component, cmWIXPatch& patch)
{
BeginElement("Feature");
AddAttribute("Id", "CM_C_" + component.Name);
@@ -90,6 +92,8 @@ void cmWIXFeaturesSourceWriter::EmitFeatureForComponent(
AddAttribute("Level", "2");
}
+ patch.ApplyFragment("CM_C_" + component.Name, *this);
+
EndElement("Feature");
}
diff --git a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h
index 9974b63..124ed42 100644
--- a/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXFeaturesSourceWriter.h
@@ -13,6 +13,7 @@
#ifndef cmWIXFeaturesSourceWriter_h
#define cmWIXFeaturesSourceWriter_h
+#include "cmWIXPatch.h"
#include "cmWIXSourceWriter.h"
#include <CPack/cmCPackGenerator.h>
@@ -29,9 +30,11 @@ public:
void CreateCMakePackageRegistryEntry(std::string const& package,
std::string const& upgradeGuid);
- void EmitFeatureForComponentGroup(const cmCPackComponentGroup& group);
+ void EmitFeatureForComponentGroup(const cmCPackComponentGroup& group,
+ cmWIXPatch& patch);
- void EmitFeatureForComponent(const cmCPackComponent& component);
+ void EmitFeatureForComponent(const cmCPackComponent& component,
+ cmWIXPatch& patch);
void EmitComponentRef(std::string const& id);
};
diff --git a/Source/CPack/cygwin.readme b/Source/CPack/cygwin.readme
deleted file mode 100644
index c0cd4b9..0000000
--- a/Source/CPack/cygwin.readme
+++ /dev/null
@@ -1,69 +0,0 @@
-http://cygwin.com/setup.html
-
-
-Need to produce two tar files:
-
-Source-
-
-- create subdirs
-- copy src
-- duplicate src
-- configure files into duplicate src
- CPack.cygwin-readme.in
- CPack.cygwin-install.sh.in
- CPack.setup.hint.in
-- diff duplicate src and orig src
-- write diff into toplevel
-- create tar file call super class
-
-cmake-2.2.3-1
-
-
-1. a source release
-cmake-2.2.3-2-src.tar.bz2
-
-cmake-2.2.3-2.patch has cmake-2.2.3/CYGWIN-PATCHES/cmake.README cmake-2.2.3/CYGWIN-PATCHES/setup.hint
-cmake-2.2.3-2.sh -> script to create cygwin release
-cmake-2.2.3.tar.bz2 -> unmodified cmake sources for 2.2.3
-
-
-
-
-
-2 a binary release
-cmake-2.2.3-2.tar.bz2
-
-normal binary release with use as the root of the tree:
-
-Here is the bootstrap command used:
-
- ${SOURCE_DIR}/bootstrap --prefix=/usr --datadir=/share/cmake-${VER} \
- --docdir=/share/doc/cmake-${VER} --mandir=/share/man
-
-CMAKE_DOC_DIR /share/doc/${PKG}-${VER}
-CMAKE_MAN_DIR /share/man
-CMAKE_DATA_DIR /share/${PKG}-${VER}
-
-Here is the directory stucture:
-
-usr/bin/cmake.exe
-usr/share/doc/cmake-2.2.3/MANIFEST ***
-usr/share/doc/Cygwin/cmake-2.2.3-2.README ****
-usr/share/cmake-2.2.3/Modules
-
-
-
-usr/bin
-usr/share/cmake-2.2.3/include
-usr/share/cmake-2.2.3/Modules/Platform
-usr/share/cmake-2.2.3/Modules
-usr/share/cmake-2.2.3/Templates
-usr/share/cmake-2.2.3
-usr/share/doc/cmake-2.2.3
-usr/share/doc/Cygwin
-usr/share/doc
-usr/share/man/man1
-usr/share/man
-usr/share
-usr
-
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index f680612..0832820 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -108,13 +108,8 @@ std::string cmCTestSVN::LoadInfo(SVNInfo& svninfo)
void cmCTestSVN::NoteOldRevision()
{
- // Info for root repository
- this->Repositories.push_back(SVNInfo(""));
- this->RootInfo = &(this->Repositories.back());
- // Info for the external repositories
- this->LoadExternals();
+ this->LoadRepositories();
- // Get info for all the repositories
std::list<SVNInfo>::iterator itbeg = this->Repositories.begin();
std::list<SVNInfo>::iterator itend = this->Repositories.end();
for (; itbeg != itend; itbeg++) {
@@ -134,7 +129,8 @@ void cmCTestSVN::NoteOldRevision()
void cmCTestSVN::NoteNewRevision()
{
- // Get info for the external repositories
+ this->LoadRepositories();
+
std::list<SVNInfo>::iterator itbeg = this->Repositories.begin();
std::list<SVNInfo>::iterator itend = this->Repositories.end();
for (; itbeg != itend; itbeg++) {
@@ -534,8 +530,13 @@ private:
}
};
-void cmCTestSVN::LoadExternals()
+void cmCTestSVN::LoadRepositories()
{
+ // Info for root repository
+ this->Repositories.clear();
+ this->Repositories.push_back(SVNInfo(""));
+ this->RootInfo = &(this->Repositories.back());
+
// Run "svn status" to get the list of external repositories
std::vector<const char*> svn_status;
svn_status.push_back("status");
diff --git a/Source/CTest/cmCTestSVN.h b/Source/CTest/cmCTestSVN.h
index 6f2374d..2301b10 100644
--- a/Source/CTest/cmCTestSVN.h
+++ b/Source/CTest/cmCTestSVN.h
@@ -86,7 +86,7 @@ private:
SVNInfo* RootInfo;
std::string LoadInfo(SVNInfo& svninfo);
- void LoadExternals();
+ void LoadRepositories();
void LoadModifications() CM_OVERRIDE;
void LoadRevisions() CM_OVERRIDE;
void LoadRevisions(SVNInfo& svninfo);
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index 5b84597..14ce3f7 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -14,6 +14,7 @@
#include <QCloseEvent>
#include <QCoreApplication>
+#include <QDesktopServices>
#include <QDialogButtonBox>
#include <QDragEnterEvent>
#include <QFileDialog>
@@ -227,6 +228,8 @@ void CMakeSetupDialog::initialize()
QObject::connect(this->GenerateButton, SIGNAL(clicked(bool)), this,
SLOT(doGenerate()));
+ QObject::connect(this->OpenProjectButton, SIGNAL(clicked(bool)), this,
+ SLOT(doOpenProject()));
QObject::connect(this->BrowseSourceDirectoryButton, SIGNAL(clicked(bool)),
this, SLOT(doSourceBrowse()));
@@ -499,6 +502,26 @@ void CMakeSetupDialog::doGenerate()
this->ConfigureNeeded = true;
}
+QString CMakeSetupDialog::getProjectFilename()
+{
+ QStringList nameFilter;
+ nameFilter << "*.sln"
+ << "*.xcodeproj";
+ QDir directory(this->BinaryDirectory->currentText());
+ QStringList nlnFile = directory.entryList(nameFilter);
+
+ if (nlnFile.count() == 1) {
+ return this->BinaryDirectory->currentText() + "/" + nlnFile.at(0);
+ }
+
+ return QString();
+}
+
+void CMakeSetupDialog::doOpenProject()
+{
+ QDesktopServices::openUrl(QUrl::fromLocalFile(this->getProjectFilename()));
+}
+
void CMakeSetupDialog::closeEvent(QCloseEvent* e)
{
// prompt for close if there are unsaved changes, and we're not busy
@@ -617,6 +640,11 @@ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir)
this->BinaryDirectory->setEditText(dir);
this->BinaryDirectory->blockSignals(false);
}
+ if (!this->getProjectFilename().isEmpty()) {
+ this->OpenProjectButton->setEnabled(true);
+ } else {
+ this->OpenProjectButton->setEnabled(false);
+ }
}
void CMakeSetupDialog::doBinaryBrowse()
@@ -1002,22 +1030,28 @@ void CMakeSetupDialog::enterState(CMakeSetupDialog::State s)
if (s == Interrupting) {
this->ConfigureButton->setEnabled(false);
this->GenerateButton->setEnabled(false);
+ this->OpenProjectButton->setEnabled(false);
} else if (s == Configuring) {
this->setEnabledState(false);
this->GenerateButton->setEnabled(false);
this->GenerateAction->setEnabled(false);
+ this->OpenProjectButton->setEnabled(false);
this->ConfigureButton->setText(tr("&Stop"));
} else if (s == Generating) {
this->CacheModified = false;
this->setEnabledState(false);
this->ConfigureButton->setEnabled(false);
this->GenerateAction->setEnabled(false);
+ this->OpenProjectButton->setEnabled(false);
this->GenerateButton->setText(tr("&Stop"));
} else if (s == ReadyConfigure) {
this->setEnabledState(true);
this->GenerateButton->setEnabled(true);
this->GenerateAction->setEnabled(true);
this->ConfigureButton->setEnabled(true);
+ if (!this->getProjectFilename().isEmpty()) {
+ this->OpenProjectButton->setEnabled(true);
+ }
this->ConfigureButton->setText(tr("&Configure"));
this->GenerateButton->setText(tr("&Generate"));
} else if (s == ReadyGenerate) {
@@ -1025,6 +1059,9 @@ void CMakeSetupDialog::enterState(CMakeSetupDialog::State s)
this->GenerateButton->setEnabled(true);
this->GenerateAction->setEnabled(true);
this->ConfigureButton->setEnabled(true);
+ if (!this->getProjectFilename().isEmpty()) {
+ this->OpenProjectButton->setEnabled(true);
+ }
this->ConfigureButton->setText(tr("&Configure"));
this->GenerateButton->setText(tr("&Generate"));
}
diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h
index 2a4ea7a..992de01 100644
--- a/Source/QtDialog/CMakeSetupDialog.h
+++ b/Source/QtDialog/CMakeSetupDialog.h
@@ -41,6 +41,8 @@ protected slots:
void initialize();
void doConfigure();
void doGenerate();
+ QString getProjectFilename();
+ void doOpenProject();
void doInstallForCommandLine();
void doHelp();
void doAbout();
diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui
index b04bd93..8d8e0cd 100644
--- a/Source/QtDialog/CMakeSetupDialog.ui
+++ b/Source/QtDialog/CMakeSetupDialog.ui
@@ -238,6 +238,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="OpenProjectButton">
+ <property name="text">
+ <string>Open &amp;Project</string>
+ </property>
+ </widget>
+ </item>
<item>
<widget class="QLabel" name="Generator">
<property name="text">
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index 88ea049..ed11f7b 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -95,10 +95,7 @@ protected:
// if there are no children
if (!m->hasChildren(idx)) {
bool adv = m->data(idx, QCMakeCacheModel::AdvancedRole).toBool();
- if (!adv || (adv && this->ShowAdvanced)) {
- return true;
- }
- return false;
+ return !adv || this->ShowAdvanced;
}
// check children
@@ -554,14 +551,16 @@ QWidget* QCMakeCacheModelDelegate::createEditor(
QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
SLOT(setFileDialogFlag(bool)));
return editor;
- } else if (type == QCMakeProperty::FILEPATH) {
+ }
+ if (type == QCMakeProperty::FILEPATH) {
QCMakeFilePathEditor* editor =
new QCMakeFilePathEditor(p, var.data(Qt::DisplayRole).toString());
QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this,
SLOT(setFileDialogFlag(bool)));
return editor;
- } else if (type == QCMakeProperty::STRING &&
- var.data(QCMakeCacheModel::StringsRole).isValid()) {
+ }
+ if (type == QCMakeProperty::STRING &&
+ var.data(QCMakeCacheModel::StringsRole).isValid()) {
QCMakeComboBox* editor = new QCMakeComboBox(
p, var.data(QCMakeCacheModel::StringsRole).toStringList());
editor->setFrame(false);
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index b7e006d..eb4c1ec 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -712,10 +712,5 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
// Compare the remaining content. If no compiler id matched above,
// including the case none was given, this will compare the whole
// content.
- if (!cmFortranStreamsDiffer(finModFile, finStampFile)) {
- return false;
- }
-
- // The modules are different.
- return true;
+ return cmFortranStreamsDiffer(finModFile, finStampFile);
}
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 835b118..ae7a511 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2564,6 +2564,11 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
return false;
}
hashMatchMSG = algo + " hash";
+ } else {
+ // Do not return error for compatibility reason.
+ std::string err = "Unexpected argument: ";
+ err += *i;
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str());
}
++i;
}
@@ -2812,6 +2817,11 @@ bool cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
statusVar = *i;
} else if (*i == "SHOW_PROGRESS") {
showProgress = true;
+ } else {
+ // Do not return error for compatibility reason.
+ std::string err = "Unexpected argument: ";
+ err += *i;
+ this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, err.c_str());
}
++i;
diff --git a/Source/cmFortranLexer.cxx b/Source/cmFortranLexer.cxx
index 195c449..7bcd993 100644
--- a/Source/cmFortranLexer.cxx
+++ b/Source/cmFortranLexer.cxx
@@ -347,8 +347,8 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 45
-#define YY_END_OF_BUFFER 46
+#define YY_NUM_RULES 50
+#define YY_END_OF_BUFFER 51
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -356,27 +356,30 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[173] =
+static yyconst flex_int16_t yy_accept[199] =
{ 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 46, 40, 42, 41, 44, 1, 40, 33, 2, 35,
- 40, 41, 38, 40, 39, 40, 39, 42, 40, 41,
- 40, 39, 9, 8, 9, 4, 3, 40, 0, 10,
- 0, 0, 0, 0, 0, 33, 33, 34, 36, 38,
- 40, 39, 0, 43, 39, 0, 0, 0, 12, 0,
- 0, 0, 0, 0, 0, 40, 0, 11, 39, 0,
- 0, 5, 0, 0, 0, 29, 0, 0, 33, 33,
- 33, 33, 0, 0, 12, 12, 0, 0, 0, 23,
- 0, 0, 0, 0, 0, 0, 6, 0, 0, 0,
+ 51, 45, 47, 46, 49, 1, 45, 33, 2, 35,
+ 45, 46, 38, 45, 44, 44, 44, 44, 44, 45,
+ 44, 47, 45, 46, 45, 44, 9, 8, 9, 4,
+ 3, 45, 0, 10, 0, 0, 0, 0, 0, 33,
+ 33, 34, 36, 38, 45, 44, 44, 44, 44, 44,
+ 0, 48, 44, 0, 0, 0, 12, 0, 0, 0,
+ 0, 0, 0, 45, 0, 11, 44, 0, 0, 5,
+ 0, 0, 0, 29, 0, 0, 33, 33, 33, 33,
+ 0, 0, 39, 44, 44, 44, 43, 12, 12, 0,
+
+ 0, 0, 23, 0, 0, 0, 0, 0, 0, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 44,
+ 44, 44, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 30, 31, 0, 0, 0, 0,
+ 0, 0, 44, 44, 44, 0, 24, 25, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 32, 27, 0,
+ 0, 20, 0, 44, 44, 42, 0, 26, 21, 0,
+ 0, 0, 19, 0, 0, 18, 28, 0, 0, 40,
+ 44, 17, 22, 0, 7, 37, 7, 15, 0, 44,
+ 14, 16, 41, 0, 0, 0, 13, 0
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 30, 31,
- 0, 0, 0, 0, 0, 0, 0, 24, 25, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 32, 27,
- 0, 0, 20, 0, 0, 26, 21, 0, 0, 0,
- 19, 0, 0, 18, 28, 0, 0, 17, 22, 0,
- 7, 37, 7, 15, 0, 14, 16, 0, 0, 0,
- 13, 0
} ;
static yyconst YY_CHAR yy_ec[256] =
@@ -387,14 +390,14 @@ static yyconst YY_CHAR yy_ec[256] =
1, 5, 6, 7, 8, 9, 1, 10, 11, 1,
1, 12, 1, 13, 1, 1, 1, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
- 18, 19, 20, 1, 21, 21, 22, 23, 24, 25,
- 21, 21, 26, 21, 21, 27, 21, 28, 21, 21,
- 21, 21, 29, 21, 30, 21, 21, 21, 21, 21,
- 1, 31, 1, 1, 32, 1, 21, 21, 33, 34,
-
- 35, 36, 21, 21, 37, 21, 21, 38, 21, 39,
- 21, 21, 21, 21, 40, 21, 41, 21, 21, 21,
- 21, 21, 1, 1, 1, 1, 1, 1, 1, 1,
+ 18, 19, 20, 1, 21, 22, 23, 24, 25, 26,
+ 22, 22, 27, 22, 22, 28, 29, 30, 31, 22,
+ 22, 32, 33, 34, 35, 22, 22, 22, 22, 22,
+ 1, 36, 1, 1, 37, 1, 21, 22, 38, 39,
+
+ 40, 41, 22, 22, 42, 22, 22, 43, 29, 44,
+ 31, 22, 22, 32, 45, 34, 46, 22, 22, 22,
+ 22, 22, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -411,195 +414,211 @@ static yyconst YY_CHAR yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst YY_CHAR yy_meta[42] =
+static yyconst YY_CHAR yy_meta[47] =
{ 0,
1, 2, 2, 3, 4, 3, 3, 1, 1, 3,
3, 1, 3, 5, 1, 3, 1, 3, 6, 1,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 1, 5, 7, 7, 7, 7, 7, 7, 7, 7,
- 7
+ 7, 7, 7, 7, 7, 1, 5, 7, 7, 7,
+ 7, 7, 7, 7, 7, 7
} ;
-static yyconst flex_uint16_t yy_base[182] =
+static yyconst flex_uint16_t yy_base[208] =
{ 0,
- 0, 40, 0, 41, 220, 48, 44, 54, 56, 65,
- 220, 0, 535, 535, 216, 535, 81, 74, 535, 535,
- 186, 535, 153, 145, 0, 85, 122, 87, 154, 155,
- 195, 227, 535, 147, 91, 535, 535, 0, 147, 535,
- 267, 34, 70, 74, 34, 122, 141, 535, 0, 535,
- 112, 0, 98, 535, 0, 156, 307, 0, 143, 43,
- 155, 151, 48, 101, 130, 348, 130, 535, 0, 121,
- 197, 165, 172, 244, 182, 183, 191, 248, 273, 293,
- 308, 314, 321, 246, 275, 216, 269, 299, 304, 327,
- 307, 304, 312, 116, 107, 367, 535, 327, 334, 347,
-
- 347, 350, 352, 349, 354, 359, 357, 363, 366, 365,
- 369, 372, 369, 373, 374, 101, 86, 372, 535, 535,
- 378, 380, 386, 382, 388, 388, 389, 535, 535, 393,
- 394, 396, 392, 430, 400, 56, 47, 403, 535, 535,
- 409, 414, 535, 409, 416, 535, 535, 416, 419, 441,
- 535, 117, 0, 535, 535, 423, 426, 535, 535, 430,
- 535, 535, 535, 535, 432, 457, 535, 459, 0, 25,
- 535, 535, 476, 483, 489, 492, 499, 506, 513, 520,
- 527
+ 0, 45, 0, 46, 392, 53, 49, 59, 61, 71,
+ 392, 0, 572, 572, 364, 572, 91, 77, 572, 572,
+ 342, 572, 317, 232, 0, 19, 42, 218, 40, 92,
+ 137, 96, 174, 240, 220, 257, 572, 238, 97, 572,
+ 572, 0, 205, 572, 302, 50, 77, 83, 59, 137,
+ 156, 572, 0, 572, 123, 0, 84, 130, 90, 92,
+ 167, 572, 0, 176, 347, 0, 190, 94, 175, 200,
+ 121, 92, 201, 393, 193, 572, 0, 162, 222, 175,
+ 171, 209, 176, 281, 184, 207, 307, 313, 328, 348,
+ 338, 111, 0, 205, 213, 125, 0, 354, 185, 280,
+
+ 336, 300, 340, 309, 278, 321, 139, 130, 245, 572,
+ 335, 347, 351, 356, 360, 375, 375, 379, 383, 300,
+ 80, 381, 384, 390, 392, 393, 397, 399, 397, 402,
+ 403, 106, 105, 284, 572, 572, 407, 408, 411, 320,
+ 413, 413, 420, 419, 421, 420, 572, 572, 421, 426,
+ 428, 420, 467, 432, 101, 83, 438, 572, 572, 439,
+ 446, 572, 436, 449, 63, 0, 450, 572, 572, 450,
+ 453, 481, 572, 64, 0, 572, 572, 454, 460, 0,
+ 464, 572, 572, 463, 572, 572, 572, 572, 468, 471,
+ 495, 572, 0, 496, 0, 38, 572, 572, 513, 520,
+
+ 526, 529, 536, 543, 550, 557, 564
} ;
-static yyconst flex_int16_t yy_def[182] =
+static yyconst flex_int16_t yy_def[208] =
{ 0,
- 172, 1, 1, 1, 1, 1, 173, 173, 173, 173,
- 172, 174, 172, 172, 175, 172, 174, 172, 172, 172,
- 174, 172, 172, 174, 176, 174, 176, 172, 172, 172,
- 177, 172, 172, 172, 172, 172, 172, 174, 175, 172,
- 172, 172, 172, 172, 172, 172, 178, 172, 174, 172,
- 174, 176, 172, 172, 27, 172, 172, 57, 174, 172,
- 172, 172, 172, 172, 172, 177, 177, 172, 32, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 178, 178,
- 178, 178, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
-
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 179, 180, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 181, 181,
- 172, 0, 172, 172, 172, 172, 172, 172, 172, 172,
- 172
+ 198, 1, 1, 1, 1, 1, 199, 199, 199, 199,
+ 198, 200, 198, 198, 201, 198, 200, 198, 198, 198,
+ 200, 198, 198, 200, 202, 202, 202, 202, 202, 200,
+ 202, 198, 198, 198, 203, 198, 198, 198, 198, 198,
+ 198, 200, 201, 198, 198, 198, 198, 198, 198, 198,
+ 204, 198, 200, 198, 200, 202, 202, 202, 202, 202,
+ 198, 198, 31, 198, 198, 65, 200, 198, 198, 198,
+ 198, 198, 198, 203, 203, 198, 36, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 204, 204, 204, 204,
+ 198, 198, 202, 202, 202, 202, 202, 198, 198, 198,
+
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 202,
+ 202, 202, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 202, 202, 202, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 202, 202, 202, 198, 198, 198, 198,
+ 198, 198, 198, 205, 206, 198, 198, 198, 198, 202,
+ 202, 198, 198, 198, 198, 198, 198, 198, 198, 202,
+ 198, 198, 202, 198, 207, 207, 198, 0, 198, 198,
+
+ 198, 198, 198, 198, 198, 198, 198
} ;
-static yyconst flex_uint16_t yy_nxt[577] =
+static yyconst flex_uint16_t yy_nxt[619] =
{ 0,
12, 13, 14, 13, 13, 15, 16, 12, 17, 18,
19, 12, 20, 12, 21, 22, 12, 23, 12, 24,
- 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
- 26, 27, 25, 25, 25, 25, 25, 25, 25, 25,
- 25, 28, 28, 171, 28, 28, 34, 29, 29, 28,
- 30, 153, 28, 35, 36, 29, 34, 73, 34, 31,
- 152, 78, 37, 35, 36, 35, 87, 34, 73, 32,
- 32, 37, 78, 92, 35, 46, 46, 87, 46, 47,
- 32, 32, 41, 48, 92, 41, 53, 54, 56, 53,
- 137, 56, 71, 72, 57, 71, 74, 75, 76, 53,
-
- 54, 77, 53, 42, 43, 136, 44, 74, 75, 76,
- 45, 117, 77, 83, 42, 43, 83, 44, 162, 162,
- 116, 45, 38, 46, 46, 95, 46, 47, 93, 38,
- 38, 48, 68, 38, 94, 55, 38, 84, 38, 93,
- 38, 38, 80, 46, 86, 80, 81, 86, 84, 40,
- 82, 70, 38, 55, 38, 58, 59, 56, 58, 65,
- 56, 38, 38, 57, 51, 38, 96, 59, 38, 96,
- 38, 50, 38, 38, 97, 90, 60, 61, 91, 62,
- 63, 88, 89, 64, 38, 38, 90, 60, 61, 91,
- 62, 63, 88, 89, 64, 66, 98, 68, 71, 72,
-
- 49, 71, 66, 66, 101, 102, 66, 98, 66, 66,
- 103, 66, 104, 66, 66, 101, 102, 86, 40, 172,
- 86, 103, 30, 104, 172, 66, 66, 67, 67, 68,
- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
- 69, 67, 67, 67, 67, 67, 67, 69, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 67, 69, 69,
- 69, 69, 69, 69, 69, 69, 69, 69, 41, 99,
- 105, 41, 100, 106, 80, 46, 86, 80, 81, 86,
- 99, 105, 82, 100, 106, 172, 172, 172, 85, 42,
- 43, 172, 44, 107, 80, 46, 45, 80, 81, 172,
-
- 42, 43, 82, 44, 107, 172, 172, 45, 58, 80,
- 46, 58, 80, 81, 172, 80, 46, 82, 80, 81,
- 85, 172, 83, 82, 108, 83, 110, 109, 113, 60,
- 61, 114, 62, 63, 115, 108, 64, 110, 109, 113,
- 60, 61, 114, 62, 63, 115, 84, 64, 66, 111,
- 68, 172, 118, 172, 112, 66, 66, 84, 119, 66,
- 111, 66, 66, 118, 66, 112, 66, 66, 96, 119,
- 120, 96, 121, 122, 123, 124, 97, 125, 66, 66,
- 126, 120, 127, 121, 122, 123, 124, 128, 125, 129,
- 130, 126, 131, 127, 132, 133, 134, 135, 128, 138,
-
- 129, 130, 139, 131, 140, 132, 133, 134, 135, 141,
- 138, 142, 143, 139, 144, 140, 145, 146, 147, 148,
- 141, 149, 142, 143, 151, 144, 154, 145, 146, 147,
- 148, 150, 149, 155, 150, 151, 156, 154, 157, 158,
- 159, 160, 150, 85, 155, 150, 164, 156, 165, 157,
- 158, 159, 160, 166, 85, 167, 172, 164, 168, 165,
- 168, 168, 172, 168, 166, 172, 167, 172, 172, 172,
- 172, 172, 172, 169, 172, 169, 33, 33, 33, 33,
- 33, 33, 33, 38, 172, 172, 172, 38, 38, 39,
- 39, 39, 39, 39, 39, 39, 52, 172, 52, 67,
-
- 67, 67, 67, 67, 67, 67, 79, 79, 79, 79,
- 79, 79, 79, 161, 161, 161, 172, 161, 161, 161,
- 163, 172, 163, 172, 163, 163, 163, 170, 170, 170,
- 170, 170, 172, 170, 11, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172
+ 25, 25, 25, 25, 26, 25, 27, 25, 28, 25,
+ 25, 25, 25, 25, 29, 30, 31, 25, 25, 26,
+ 25, 27, 25, 25, 25, 29, 32, 32, 57, 32,
+ 32, 38, 33, 33, 32, 34, 197, 32, 39, 40,
+ 33, 38, 57, 38, 35, 186, 186, 41, 39, 40,
+ 39, 58, 60, 38, 81, 36, 36, 41, 50, 50,
+ 39, 50, 51, 181, 60, 58, 52, 175, 86, 81,
+ 36, 36, 45, 61, 62, 45, 61, 64, 79, 80,
+
+ 64, 79, 86, 65, 82, 174, 83, 93, 84, 156,
+ 155, 144, 85, 96, 46, 47, 97, 48, 100, 82,
+ 83, 106, 93, 84, 91, 49, 85, 91, 96, 46,
+ 47, 97, 48, 100, 133, 106, 49, 42, 50, 50,
+ 119, 50, 51, 132, 42, 42, 52, 105, 42, 92,
+ 63, 42, 94, 42, 119, 42, 42, 88, 50, 122,
+ 88, 89, 105, 95, 92, 90, 108, 94, 61, 62,
+ 122, 61, 42, 63, 42, 66, 109, 64, 66, 109,
+ 64, 42, 42, 65, 110, 42, 99, 67, 42, 99,
+ 42, 99, 42, 42, 99, 76, 111, 68, 69, 114,
+
+ 70, 71, 101, 67, 102, 107, 117, 44, 72, 42,
+ 42, 111, 68, 69, 114, 70, 71, 101, 102, 72,
+ 74, 117, 76, 79, 80, 103, 79, 74, 74, 104,
+ 118, 74, 120, 74, 74, 112, 74, 121, 74, 74,
+ 103, 113, 78, 104, 73, 118, 109, 120, 59, 109,
+ 112, 55, 121, 113, 110, 74, 74, 75, 75, 76,
+ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
+ 77, 75, 75, 75, 75, 75, 75, 77, 77, 77,
+ 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
+ 77, 77, 75, 77, 77, 77, 77, 77, 77, 77,
+
+ 77, 77, 77, 45, 115, 123, 45, 130, 88, 50,
+ 116, 88, 89, 157, 88, 50, 90, 88, 89, 115,
+ 123, 130, 90, 126, 116, 46, 47, 157, 48, 88,
+ 50, 129, 88, 89, 143, 54, 49, 90, 126, 91,
+ 46, 47, 91, 48, 131, 143, 129, 49, 66, 88,
+ 50, 66, 88, 89, 161, 99, 53, 90, 99, 131,
+ 98, 134, 124, 127, 92, 161, 44, 98, 125, 128,
+ 68, 69, 135, 70, 71, 136, 134, 124, 127, 92,
+ 125, 72, 137, 128, 138, 68, 69, 135, 70, 71,
+ 136, 198, 72, 74, 34, 76, 198, 137, 139, 138,
+
+ 74, 74, 140, 141, 74, 142, 74, 74, 145, 74,
+ 146, 74, 74, 139, 198, 147, 148, 140, 141, 149,
+ 142, 150, 151, 145, 152, 146, 153, 154, 74, 74,
+ 147, 148, 158, 159, 149, 160, 150, 151, 162, 152,
+ 163, 153, 154, 164, 165, 166, 168, 158, 159, 167,
+ 160, 169, 170, 162, 171, 163, 198, 173, 164, 165,
+ 166, 168, 176, 167, 177, 171, 169, 170, 172, 178,
+ 179, 172, 173, 180, 182, 183, 184, 176, 188, 177,
+ 98, 179, 172, 189, 178, 172, 190, 191, 180, 182,
+ 183, 184, 192, 188, 98, 193, 194, 194, 189, 194,
+
+ 194, 190, 191, 198, 198, 198, 198, 192, 198, 198,
+ 193, 195, 195, 37, 37, 37, 37, 37, 37, 37,
+ 42, 198, 198, 198, 42, 42, 43, 43, 43, 43,
+ 43, 43, 43, 56, 198, 56, 75, 75, 75, 75,
+ 75, 75, 75, 87, 87, 87, 87, 87, 87, 87,
+ 185, 185, 185, 198, 185, 185, 185, 187, 198, 187,
+ 198, 187, 187, 187, 196, 196, 196, 196, 196, 198,
+ 196, 11, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198
} ;
-static yyconst flex_int16_t yy_chk[577] =
+static yyconst flex_int16_t yy_chk[619] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 4, 170, 2, 4, 7, 2, 4, 6,
- 6, 137, 6, 7, 7, 6, 8, 42, 9, 6,
- 136, 45, 9, 8, 8, 9, 60, 10, 42, 6,
- 6, 10, 45, 63, 10, 18, 18, 60, 18, 18,
- 6, 6, 17, 18, 63, 17, 26, 26, 28, 26,
- 117, 28, 35, 35, 28, 35, 43, 43, 44, 53,
-
- 53, 44, 53, 17, 17, 116, 17, 43, 43, 44,
- 17, 95, 44, 51, 17, 17, 51, 17, 152, 152,
- 94, 17, 27, 46, 46, 70, 46, 46, 64, 27,
- 27, 46, 67, 27, 65, 27, 27, 51, 27, 64,
- 27, 27, 47, 47, 59, 47, 47, 59, 51, 39,
- 47, 34, 27, 27, 29, 29, 59, 56, 29, 30,
- 56, 29, 29, 56, 24, 29, 72, 29, 29, 72,
- 29, 23, 29, 29, 72, 62, 29, 29, 62, 29,
- 29, 61, 61, 29, 29, 29, 62, 29, 29, 62,
- 29, 29, 61, 61, 29, 31, 73, 31, 71, 71,
-
- 21, 71, 31, 31, 75, 76, 31, 73, 31, 31,
- 76, 31, 77, 31, 31, 75, 76, 86, 15, 11,
- 86, 76, 5, 77, 0, 31, 31, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 32, 41, 74,
- 78, 41, 74, 84, 79, 79, 85, 79, 79, 85,
- 74, 78, 79, 74, 84, 0, 0, 0, 85, 41,
- 41, 0, 41, 87, 80, 80, 41, 80, 80, 0,
-
- 41, 41, 80, 41, 87, 0, 0, 41, 57, 81,
- 81, 57, 81, 81, 0, 82, 82, 81, 82, 82,
- 57, 0, 83, 82, 88, 83, 89, 88, 91, 57,
- 57, 92, 57, 57, 93, 88, 57, 89, 88, 91,
- 57, 57, 92, 57, 57, 93, 83, 57, 66, 90,
- 66, 0, 98, 0, 90, 66, 66, 83, 99, 66,
- 90, 66, 66, 98, 66, 90, 66, 66, 96, 99,
- 100, 96, 101, 102, 103, 104, 96, 105, 66, 66,
- 106, 100, 107, 101, 102, 103, 104, 108, 105, 109,
- 110, 106, 111, 107, 112, 113, 114, 115, 108, 118,
-
- 109, 110, 121, 111, 122, 112, 113, 114, 115, 123,
- 118, 124, 125, 121, 126, 122, 127, 130, 131, 132,
- 123, 133, 124, 125, 135, 126, 138, 127, 130, 131,
- 132, 134, 133, 141, 134, 135, 142, 138, 144, 145,
- 148, 149, 150, 134, 141, 150, 156, 142, 157, 144,
- 145, 148, 149, 160, 150, 165, 0, 156, 166, 157,
- 168, 166, 0, 168, 160, 0, 165, 0, 0, 0,
- 0, 0, 0, 166, 0, 168, 173, 173, 173, 173,
- 173, 173, 173, 174, 0, 0, 0, 174, 174, 175,
- 175, 175, 175, 175, 175, 175, 176, 0, 176, 177,
-
- 177, 177, 177, 177, 177, 177, 178, 178, 178, 178,
- 178, 178, 178, 179, 179, 179, 0, 179, 179, 179,
- 180, 0, 180, 0, 180, 180, 180, 181, 181, 181,
- 181, 181, 0, 181, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
- 172, 172, 172, 172, 172, 172
+ 1, 1, 1, 1, 1, 1, 2, 4, 26, 2,
+ 4, 7, 2, 4, 6, 6, 196, 6, 7, 7,
+ 6, 8, 26, 9, 6, 174, 174, 9, 8, 8,
+ 9, 27, 29, 10, 46, 6, 6, 10, 18, 18,
+ 10, 18, 18, 165, 29, 27, 18, 156, 49, 46,
+ 6, 6, 17, 30, 30, 17, 30, 32, 39, 39,
+
+ 32, 39, 49, 32, 47, 155, 47, 57, 48, 133,
+ 132, 121, 48, 59, 17, 17, 60, 17, 68, 47,
+ 47, 72, 57, 48, 55, 17, 48, 55, 59, 17,
+ 17, 60, 17, 68, 108, 72, 17, 31, 50, 50,
+ 92, 50, 50, 107, 31, 31, 50, 71, 31, 55,
+ 31, 31, 58, 31, 92, 31, 31, 51, 51, 96,
+ 51, 51, 71, 58, 55, 51, 78, 58, 61, 61,
+ 96, 61, 31, 31, 33, 33, 80, 64, 33, 80,
+ 64, 33, 33, 64, 80, 33, 99, 33, 33, 99,
+ 33, 67, 33, 33, 67, 75, 81, 33, 33, 83,
+
+ 33, 33, 69, 67, 69, 73, 85, 43, 33, 33,
+ 33, 81, 33, 33, 83, 33, 33, 69, 69, 33,
+ 35, 85, 35, 79, 79, 70, 79, 35, 35, 70,
+ 86, 35, 94, 35, 35, 82, 35, 95, 35, 35,
+ 70, 82, 38, 70, 34, 86, 109, 94, 28, 109,
+ 82, 24, 95, 82, 109, 35, 35, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+ 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
+
+ 36, 36, 36, 45, 84, 100, 45, 105, 87, 87,
+ 84, 87, 87, 134, 88, 88, 87, 88, 88, 84,
+ 100, 105, 88, 102, 84, 45, 45, 134, 45, 89,
+ 89, 104, 89, 89, 120, 23, 45, 89, 102, 91,
+ 45, 45, 91, 45, 106, 120, 104, 45, 65, 90,
+ 90, 65, 90, 90, 140, 98, 21, 90, 98, 106,
+ 65, 111, 101, 103, 91, 140, 15, 98, 101, 103,
+ 65, 65, 112, 65, 65, 113, 111, 101, 103, 91,
+ 101, 65, 114, 103, 115, 65, 65, 112, 65, 65,
+ 113, 11, 65, 74, 5, 74, 0, 114, 116, 115,
+
+ 74, 74, 117, 118, 74, 119, 74, 74, 122, 74,
+ 123, 74, 74, 116, 0, 124, 125, 117, 118, 126,
+ 119, 127, 128, 122, 129, 123, 130, 131, 74, 74,
+ 124, 125, 137, 138, 126, 139, 127, 128, 141, 129,
+ 142, 130, 131, 143, 144, 145, 149, 137, 138, 146,
+ 139, 150, 151, 141, 152, 142, 0, 154, 143, 144,
+ 145, 149, 157, 146, 160, 152, 150, 151, 153, 161,
+ 163, 153, 154, 164, 167, 170, 171, 157, 178, 160,
+ 153, 163, 172, 179, 161, 172, 181, 184, 164, 167,
+ 170, 171, 189, 178, 172, 190, 191, 194, 179, 191,
+
+ 194, 181, 184, 0, 0, 0, 0, 189, 0, 0,
+ 190, 191, 194, 199, 199, 199, 199, 199, 199, 199,
+ 200, 0, 0, 0, 200, 200, 201, 201, 201, 201,
+ 201, 201, 201, 202, 0, 202, 203, 203, 203, 203,
+ 203, 203, 203, 204, 204, 204, 204, 204, 204, 204,
+ 205, 205, 205, 0, 205, 205, 205, 206, 0, 206,
+ 0, 206, 206, 206, 207, 207, 207, 207, 207, 0,
+ 207, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+
+ 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
+ 198, 198, 198, 198, 198, 198, 198, 198
} ;
/* The intent behind this definition is that it'll catch
@@ -666,7 +685,7 @@ Modify cmFortranLexer.cxx:
/*--------------------------------------------------------------------------*/
-#line 670 "cmFortranLexer.cxx"
+#line 689 "cmFortranLexer.cxx"
#define INITIAL 0
#define free_fmt 1
@@ -937,7 +956,7 @@ YY_DECL
#line 65 "cmFortranLexer.in.l"
-#line 941 "cmFortranLexer.cxx"
+#line 960 "cmFortranLexer.cxx"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
@@ -965,13 +984,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 173 )
+ if ( yy_current_state >= 199 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 535 );
+ while ( yy_base[yy_current_state] != 572 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1193,40 +1212,60 @@ YY_RULE_SETUP
case 39:
YY_RULE_SETUP
#line 154 "cmFortranLexer.in.l"
+{ return END; }
+case 40:
+YY_RULE_SETUP
+#line 155 "cmFortranLexer.in.l"
+{ return INCLUDE; }
+case 41:
+YY_RULE_SETUP
+#line 156 "cmFortranLexer.in.l"
+{ return INTERFACE; }
+case 42:
+YY_RULE_SETUP
+#line 157 "cmFortranLexer.in.l"
+{ return MODULE; }
+case 43:
+YY_RULE_SETUP
+#line 158 "cmFortranLexer.in.l"
+{ return USE; }
+case 44:
+YY_RULE_SETUP
+#line 160 "cmFortranLexer.in.l"
{
yylvalp->string = strdup(yytext);
return WORD;
}
-case 40:
+case 45:
YY_RULE_SETUP
-#line 159 "cmFortranLexer.in.l"
+#line 165 "cmFortranLexer.in.l"
{ return GARBAGE; }
-case 41:
-/* rule 41 can match eol */
+case 46:
+/* rule 46 can match eol */
YY_RULE_SETUP
-#line 161 "cmFortranLexer.in.l"
+#line 167 "cmFortranLexer.in.l"
{ return EOSTMT; }
-case 42:
+case 47:
YY_RULE_SETUP
-#line 164 "cmFortranLexer.in.l"
+#line 170 "cmFortranLexer.in.l"
/* Ignore */
YY_BREAK
-case 43:
-/* rule 43 can match eol */
+case 48:
+/* rule 48 can match eol */
YY_RULE_SETUP
-#line 165 "cmFortranLexer.in.l"
+#line 171 "cmFortranLexer.in.l"
/* Ignore line-endings preceded by \ */
YY_BREAK
-case 44:
+case 49:
YY_RULE_SETUP
-#line 167 "cmFortranLexer.in.l"
+#line 173 "cmFortranLexer.in.l"
{ return *yytext; }
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(free_fmt):
case YY_STATE_EOF(fixed_fmt):
case YY_STATE_EOF(str_sq):
case YY_STATE_EOF(str_dq):
-#line 169 "cmFortranLexer.in.l"
+#line 175 "cmFortranLexer.in.l"
{
if(!cmFortranParser_FilePop(yyextra) )
{
@@ -1234,12 +1273,12 @@ case YY_STATE_EOF(str_dq):
}
}
YY_BREAK
-case 45:
+case 50:
YY_RULE_SETUP
-#line 176 "cmFortranLexer.in.l"
+#line 182 "cmFortranLexer.in.l"
ECHO;
YY_BREAK
-#line 1276 "cmFortranLexer.cxx"
+#line 1320 "cmFortranLexer.cxx"
case YY_END_OF_BUFFER:
{
@@ -1533,7 +1572,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 173 )
+ if ( yy_current_state >= 199 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
@@ -1562,11 +1601,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 173 )
+ if ( yy_current_state >= 199 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];
- yy_is_jam = (yy_current_state == 172);
+ yy_is_jam = (yy_current_state == 198);
(void)yyg;
return yy_is_jam ? 0 : yy_current_state;
@@ -2408,7 +2447,7 @@ void cmFortran_yyfree (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 176 "cmFortranLexer.in.l"
+#line 182 "cmFortranLexer.in.l"
diff --git a/Source/cmFortranLexer.h b/Source/cmFortranLexer.h
index e20c0aa..cb175ec 100644
--- a/Source/cmFortranLexer.h
+++ b/Source/cmFortranLexer.h
@@ -337,7 +337,7 @@ extern int cmFortran_yylex (yyscan_t yyscanner);
#undef YY_DECL
#endif
-#line 176 "cmFortranLexer.in.l"
+#line 182 "cmFortranLexer.in.l"
#line 344 "cmFortranLexer.h"
diff --git a/Source/cmFortranLexer.in.l b/Source/cmFortranLexer.in.l
index aa879e8..6870f7c 100644
--- a/Source/cmFortranLexer.in.l
+++ b/Source/cmFortranLexer.in.l
@@ -151,6 +151,12 @@ $[ \t]*endif { return F90PPR_ENDIF; }
=|=> { return ASSIGNMENT_OP; }
+[Ee][Nn][Dd] { return END; }
+[Ii][Nn][Cc][Ll][Uu][Dd][Ee] { return INCLUDE; }
+[Ii][Nn][Tt][Ee][Rr][Ff][Aa][Cc][Ee] { return INTERFACE; }
+[Mm][Oo][Dd][Uu][Ll][Ee] { return MODULE; }
+[Uu][Ss][Ee] { return USE; }
+
[a-zA-Z_][a-zA-Z_0-9]* {
yylvalp->string = strdup(yytext);
return WORD;
diff --git a/Source/cmFortranParser.cxx b/Source/cmFortranParser.cxx
index be2d5ab..bf4e7c4 100644
--- a/Source/cmFortranParser.cxx
+++ b/Source/cmFortranParser.cxx
@@ -123,12 +123,6 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
cmFortranParser_Error(parser, message);
}
-static bool cmFortranParserIsKeyword(const char* word,
- const char* keyword)
-{
- return cmsysString_strcasecmp(word, keyword) == 0;
-}
-
/* Disable some warnings in the generated code. */
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
@@ -139,7 +133,7 @@ static bool cmFortranParserIsKeyword(const char* word,
# pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */
#endif
-#line 143 "cmFortranParser.cxx" /* yacc.c:339 */
+#line 137 "cmFortranParser.cxx" /* yacc.c:339 */
# ifndef YY_NULLPTR
# if defined __cplusplus && 201103L <= __cplusplus
@@ -202,7 +196,12 @@ extern int cmFortran_yydebug;
UNTERMINATED_STRING = 283,
STRING = 284,
WORD = 285,
- CPP_INCLUDE_ANGLE = 286
+ CPP_INCLUDE_ANGLE = 286,
+ END = 287,
+ INCLUDE = 288,
+ INTERFACE = 289,
+ MODULE = 290,
+ USE = 291
};
#endif
/* Tokens. */
@@ -235,17 +234,22 @@ extern int cmFortran_yydebug;
#define STRING 284
#define WORD 285
#define CPP_INCLUDE_ANGLE 286
+#define END 287
+#define INCLUDE 288
+#define INTERFACE 289
+#define MODULE 290
+#define USE 291
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
-#line 81 "cmFortranParser.y" /* yacc.c:355 */
+#line 75 "cmFortranParser.y" /* yacc.c:355 */
char* string;
-#line 249 "cmFortranParser.cxx" /* yacc.c:355 */
+#line 253 "cmFortranParser.cxx" /* yacc.c:355 */
};
typedef union YYSTYPE YYSTYPE;
@@ -261,7 +265,7 @@ int cmFortran_yyparse (yyscan_t yyscanner);
/* Copy the second part of user declarations. */
-#line 265 "cmFortranParser.cxx" /* yacc.c:358 */
+#line 269 "cmFortranParser.cxx" /* yacc.c:358 */
#ifdef short
# undef short
@@ -503,21 +507,21 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 249
+#define YYLAST 469
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 32
+#define YYNTOKENS 37
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 16
+#define YYNNTS 14
/* YYNRULES -- Number of rules. */
-#define YYNRULES 54
+#define YYNRULES 57
/* YYNSTATES -- Number of states. */
-#define YYNSTATES 101
+#define YYNSTATES 109
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 286
+#define YYMAXUTOK 291
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -554,19 +558,20 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
- 0, 103, 103, 103, 105, 105, 108, 113, 120, 138,
- 146, 156, 164, 169, 174, 179, 184, 189, 194, 199,
- 203, 207, 211, 215, 218, 219, 220, 225, 225, 225,
- 226, 226, 227, 227, 228, 228, 229, 229, 230, 230,
- 231, 231, 232, 232, 233, 233, 234, 234, 237, 238,
- 239, 240, 241, 242, 243
+ 0, 102, 102, 102, 105, 109, 114, 119, 124, 128,
+ 133, 141, 146, 151, 156, 161, 166, 171, 176, 181,
+ 185, 189, 193, 197, 198, 203, 203, 203, 204, 204,
+ 205, 205, 206, 206, 207, 207, 208, 208, 209, 209,
+ 210, 210, 211, 211, 212, 212, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, 226
};
#endif
@@ -581,9 +586,9 @@ static const char *const yytname[] =
"CPP_IFNDEF", "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF",
"F90PPR_IFDEF", "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE",
"F90PPR_ELIF", "F90PPR_ENDIF", "COMMA", "DCOLON", "UNTERMINATED_STRING",
- "STRING", "WORD", "CPP_INCLUDE_ANGLE", "$accept", "code", "stmt",
- "assignment_stmt", "keyword_stmt", "include", "define", "undef", "ifdef",
- "ifndef", "if", "elif", "else", "endif", "other", "misc_code", YY_NULLPTR
+ "STRING", "WORD", "CPP_INCLUDE_ANGLE", "END", "INCLUDE", "INTERFACE",
+ "MODULE", "USE", "$accept", "code", "stmt", "include", "define", "undef",
+ "ifdef", "ifndef", "if", "elif", "else", "endif", "other", "misc_code", YY_NULLPTR
};
#endif
@@ -595,14 +600,14 @@ static const yytype_uint16 yytoknum[] =
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 286
+ 285, 286, 287, 288, 289, 290, 291
};
# endif
-#define YYPACT_NINF -29
+#define YYPACT_NINF -38
#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-29)))
+ (!!((Yystate) == (-38)))
#define YYTABLE_NINF -1
@@ -613,17 +618,17 @@ static const yytype_uint16 yytoknum[] =
STATE-NUM. */
static const yytype_int16 yypact[] =
{
- -29, 41, -29, -29, -29, -29, -28, -29, -29, -29,
- -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
- -29, -29, -29, -29, -29, -29, 219, -29, -29, -29,
- -29, -26, -22, -17, -15, -12, -29, -29, -29, -29,
- 2, -29, -29, -29, -29, -11, -8, -29, -29, 64,
- -29, -29, -29, -29, -29, 70, 75, 80, 108, -29,
- -29, -29, -29, -29, -29, -29, -29, -29, 113, 118,
- 123, -25, -29, 128, 156, -29, 161, 166, 171, 176,
- 204, -29, -29, -29, -29, -29, -29, -29, 3, 209,
- -29, -29, -29, -29, -29, -29, -29, -29, -29, 214,
- -29
+ -38, 39, -38, 3, -38, -20, -38, -38, -38, -38,
+ -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
+ -38, -38, -38, -38, -38, -38, -22, -16, 1, -8,
+ -6, -38, -4, -7, -3, -2, -1, -38, -38, -38,
+ -38, -38, -38, 62, -38, -38, -38, -38, -38, 0,
+ 2, -38, -38, -38, -38, -38, -38, 73, 107, 118,
+ 152, 163, -38, -38, -38, -38, -38, -38, -38, -38,
+ -38, -38, -38, -38, -38, -38, 197, 208, 242, 253,
+ 6, -38, 287, 298, 332, 343, 377, 388, -38, -38,
+ -38, -38, -38, -38, -38, -38, -38, 4, 422, -38,
+ -38, -38, -38, -38, -38, -38, -38, 433, -38
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -631,31 +636,31 @@ static const yytype_int16 yypact[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 2, 0, 1, 26, 25, 46, 0, 27, 28, 29,
- 31, 30, 33, 32, 34, 36, 38, 42, 40, 44,
- 35, 37, 39, 43, 41, 45, 0, 46, 3, 5,
- 4, 0, 0, 0, 0, 0, 46, 46, 46, 46,
- 0, 46, 7, 46, 46, 0, 0, 46, 46, 0,
- 46, 46, 46, 46, 46, 0, 0, 0, 0, 24,
- 51, 50, 53, 52, 54, 49, 48, 47, 0, 0,
- 0, 0, 46, 0, 0, 13, 0, 0, 0, 0,
- 0, 19, 20, 21, 22, 12, 6, 23, 0, 0,
- 11, 8, 14, 15, 16, 17, 18, 46, 9, 0,
- 10
+ 2, 0, 1, 0, 23, 0, 25, 26, 27, 29,
+ 28, 31, 30, 32, 34, 36, 40, 38, 42, 33,
+ 35, 37, 41, 39, 43, 44, 0, 0, 0, 0,
+ 0, 3, 0, 0, 0, 0, 0, 44, 44, 44,
+ 44, 24, 44, 0, 44, 44, 4, 44, 44, 0,
+ 0, 44, 44, 44, 44, 44, 44, 0, 0, 0,
+ 0, 0, 13, 54, 53, 56, 55, 57, 52, 46,
+ 47, 48, 49, 50, 51, 45, 0, 0, 0, 0,
+ 0, 44, 0, 0, 0, 0, 0, 0, 19, 20,
+ 21, 22, 12, 8, 11, 7, 6, 0, 0, 5,
+ 14, 15, 16, 17, 18, 44, 9, 0, 10
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -29, -29, -29, -29, -29, -29, -29, -29, -29, -29,
- -29, -29, -29, -29, -27, -29
+ -38, -38, -38, -38, -38, -38, -38, -38, -38, -38,
+ -38, -38, -37, -38
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 1, 28, 29, 30, 31, 32, 33, 34, 35,
- 36, 37, 38, 39, 40, 67
+ -1, 1, 31, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 43, 75
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
@@ -663,99 +668,143 @@ static const yytype_int8 yydefgoto[] =
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_uint8 yytable[] =
{
- 49, 41, 88, 50, 0, 59, 60, 61, 51, 55,
- 56, 57, 58, 52, 68, 53, 69, 70, 54, 71,
- 73, 74, 72, 76, 77, 78, 79, 80, 62, 63,
- 64, 65, 66, 97, 0, 0, 0, 0, 0, 0,
- 0, 2, 3, 0, 4, 89, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 75, 60, 61,
- 99, 26, 27, 81, 60, 61, 0, 0, 82, 60,
- 61, 0, 0, 83, 60, 61, 0, 0, 0, 0,
- 62, 63, 64, 65, 66, 0, 62, 63, 64, 65,
- 66, 62, 63, 64, 65, 66, 62, 63, 64, 65,
- 66, 84, 60, 61, 0, 0, 85, 60, 61, 0,
- 0, 86, 60, 61, 0, 0, 87, 60, 61, 0,
- 0, 90, 60, 61, 62, 63, 64, 65, 66, 62,
- 63, 64, 65, 66, 62, 63, 64, 65, 66, 62,
- 63, 64, 65, 66, 62, 63, 64, 65, 66, 91,
- 60, 61, 0, 0, 92, 60, 61, 0, 0, 93,
- 60, 61, 0, 0, 94, 60, 61, 0, 0, 95,
- 60, 61, 62, 63, 64, 65, 66, 62, 63, 64,
- 65, 66, 62, 63, 64, 65, 66, 62, 63, 64,
- 65, 66, 62, 63, 64, 65, 66, 96, 60, 61,
- 0, 0, 98, 60, 61, 0, 0, 100, 60, 61,
- 0, 0, 42, 43, 44, 0, 0, 0, 0, 0,
- 62, 63, 64, 65, 66, 62, 63, 64, 65, 66,
- 62, 63, 64, 65, 66, 45, 46, 0, 47, 48
+ 57, 58, 59, 60, 46, 61, 41, 76, 77, 42,
+ 78, 79, 44, 45, 82, 83, 84, 85, 86, 87,
+ 49, 50, 48, 53, 51, 52, 0, 54, 55, 56,
+ 80, 47, 81, 97, 105, 0, 0, 0, 0, 2,
+ 3, 0, 4, 0, 98, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 62, 63, 64, 107, 0,
+ 25, 26, 27, 28, 29, 30, 88, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
+ 67, 68, 69, 0, 70, 71, 72, 73, 74, 65,
+ 66, 67, 68, 69, 0, 70, 71, 72, 73, 74,
+ 89, 63, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 90, 63, 64, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 65, 66, 67, 68, 69, 0, 70,
+ 71, 72, 73, 74, 65, 66, 67, 68, 69, 0,
+ 70, 71, 72, 73, 74, 91, 63, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0, 92, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
+ 67, 68, 69, 0, 70, 71, 72, 73, 74, 65,
+ 66, 67, 68, 69, 0, 70, 71, 72, 73, 74,
+ 93, 63, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 94, 63, 64, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 65, 66, 67, 68, 69, 0, 70,
+ 71, 72, 73, 74, 65, 66, 67, 68, 69, 0,
+ 70, 71, 72, 73, 74, 95, 63, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0, 96, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
+ 67, 68, 69, 0, 70, 71, 72, 73, 74, 65,
+ 66, 67, 68, 69, 0, 70, 71, 72, 73, 74,
+ 99, 63, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 100, 63, 64, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 65, 66, 67, 68, 69, 0, 70,
+ 71, 72, 73, 74, 65, 66, 67, 68, 69, 0,
+ 70, 71, 72, 73, 74, 101, 63, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0, 102, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
+ 67, 68, 69, 0, 70, 71, 72, 73, 74, 65,
+ 66, 67, 68, 69, 0, 70, 71, 72, 73, 74,
+ 103, 63, 64, 0, 0, 0, 0, 0, 0, 0,
+ 0, 104, 63, 64, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 65, 66, 67, 68, 69, 0, 70,
+ 71, 72, 73, 74, 65, 66, 67, 68, 69, 0,
+ 70, 71, 72, 73, 74, 106, 63, 64, 0, 0,
+ 0, 0, 0, 0, 0, 0, 108, 63, 64, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 65, 66,
+ 67, 68, 69, 0, 70, 71, 72, 73, 74, 65,
+ 66, 67, 68, 69, 0, 70, 71, 72, 73, 74
};
static const yytype_int8 yycheck[] =
{
- 27, 29, 27, 29, -1, 3, 4, 5, 30, 36,
- 37, 38, 39, 30, 41, 30, 43, 44, 30, 30,
- 47, 48, 30, 50, 51, 52, 53, 54, 26, 27,
- 28, 29, 30, 30, -1, -1, -1, -1, -1, -1,
- -1, 0, 1, -1, 3, 72, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 23, 24, 25, 3, 4, 5,
- 97, 30, 31, 3, 4, 5, -1, -1, 3, 4,
- 5, -1, -1, 3, 4, 5, -1, -1, -1, -1,
- 26, 27, 28, 29, 30, -1, 26, 27, 28, 29,
- 30, 26, 27, 28, 29, 30, 26, 27, 28, 29,
- 30, 3, 4, 5, -1, -1, 3, 4, 5, -1,
- -1, 3, 4, 5, -1, -1, 3, 4, 5, -1,
- -1, 3, 4, 5, 26, 27, 28, 29, 30, 26,
- 27, 28, 29, 30, 26, 27, 28, 29, 30, 26,
- 27, 28, 29, 30, 26, 27, 28, 29, 30, 3,
- 4, 5, -1, -1, 3, 4, 5, -1, -1, 3,
- 4, 5, -1, -1, 3, 4, 5, -1, -1, 3,
- 4, 5, 26, 27, 28, 29, 30, 26, 27, 28,
- 29, 30, 26, 27, 28, 29, 30, 26, 27, 28,
- 29, 30, 26, 27, 28, 29, 30, 3, 4, 5,
- -1, -1, 3, 4, 5, -1, -1, 3, 4, 5,
- -1, -1, 3, 4, 5, -1, -1, -1, -1, -1,
- 26, 27, 28, 29, 30, 26, 27, 28, 29, 30,
- 26, 27, 28, 29, 30, 26, 27, -1, 29, 30
+ 37, 38, 39, 40, 3, 42, 3, 44, 45, 29,
+ 47, 48, 34, 29, 51, 52, 53, 54, 55, 56,
+ 26, 27, 30, 30, 30, 29, -1, 30, 30, 30,
+ 30, 30, 30, 27, 30, -1, -1, -1, -1, 0,
+ 1, -1, 3, -1, 81, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 3, 4, 5, 105, -1,
+ 31, 32, 33, 34, 35, 36, 3, 4, 5, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 26, 27,
+ 28, 29, 30, -1, 32, 33, 34, 35, 36, 26,
+ 27, 28, 29, 30, -1, 32, 33, 34, 35, 36,
+ 3, 4, 5, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, 4, 5, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 26, 27, 28, 29, 30, -1, 32,
+ 33, 34, 35, 36, 26, 27, 28, 29, 30, -1,
+ 32, 33, 34, 35, 36, 3, 4, 5, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 26, 27,
+ 28, 29, 30, -1, 32, 33, 34, 35, 36, 26,
+ 27, 28, 29, 30, -1, 32, 33, 34, 35, 36,
+ 3, 4, 5, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, 4, 5, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 26, 27, 28, 29, 30, -1, 32,
+ 33, 34, 35, 36, 26, 27, 28, 29, 30, -1,
+ 32, 33, 34, 35, 36, 3, 4, 5, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 26, 27,
+ 28, 29, 30, -1, 32, 33, 34, 35, 36, 26,
+ 27, 28, 29, 30, -1, 32, 33, 34, 35, 36,
+ 3, 4, 5, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, 4, 5, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 26, 27, 28, 29, 30, -1, 32,
+ 33, 34, 35, 36, 26, 27, 28, 29, 30, -1,
+ 32, 33, 34, 35, 36, 3, 4, 5, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 26, 27,
+ 28, 29, 30, -1, 32, 33, 34, 35, 36, 26,
+ 27, 28, 29, 30, -1, 32, 33, 34, 35, 36,
+ 3, 4, 5, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, 4, 5, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 26, 27, 28, 29, 30, -1, 32,
+ 33, 34, 35, 36, 26, 27, 28, 29, 30, -1,
+ 32, 33, 34, 35, 36, 3, 4, 5, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3, 4, 5, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 26, 27,
+ 28, 29, 30, -1, 32, 33, 34, 35, 36, 26,
+ 27, 28, 29, 30, -1, 32, 33, 34, 35, 36
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 33, 0, 1, 3, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 30, 31, 34, 35,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 29, 3, 4, 5, 26, 27, 29, 30, 46,
- 29, 30, 30, 30, 30, 46, 46, 46, 46, 3,
- 4, 5, 26, 27, 28, 29, 30, 47, 46, 46,
- 46, 30, 30, 46, 46, 3, 46, 46, 46, 46,
- 46, 3, 3, 3, 3, 3, 3, 3, 27, 46,
- 3, 3, 3, 3, 3, 3, 3, 30, 3, 46,
- 3
+ 0, 38, 0, 1, 3, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 31, 32, 33, 34, 35,
+ 36, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 3, 29, 49, 34, 29, 3, 30, 30, 26,
+ 27, 30, 29, 30, 30, 30, 30, 49, 49, 49,
+ 49, 49, 3, 4, 5, 26, 27, 28, 29, 30,
+ 32, 33, 34, 35, 36, 50, 49, 49, 49, 49,
+ 30, 30, 49, 49, 49, 49, 49, 49, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 27, 49, 3,
+ 3, 3, 3, 3, 3, 30, 3, 49, 3
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 32, 33, 33, 34, 34, 35, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 37, 37, 37,
- 38, 38, 39, 39, 40, 40, 41, 41, 42, 42,
- 43, 43, 44, 44, 45, 45, 46, 46, 47, 47,
- 47, 47, 47, 47, 47
+ 0, 37, 38, 38, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 40, 40, 40, 41, 41,
+ 42, 42, 43, 43, 44, 44, 45, 45, 46, 46,
+ 47, 47, 48, 48, 49, 49, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
- 0, 2, 0, 2, 1, 1, 4, 2, 4, 5,
+ 0, 2, 0, 2, 2, 4, 4, 4, 4, 5,
7, 4, 4, 3, 4, 4, 4, 4, 4, 3,
- 3, 3, 3, 4, 3, 1, 1, 1, 1, 1,
+ 3, 3, 3, 1, 2, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 0, 2, 1, 1,
- 1, 1, 1, 1, 1
+ 1, 1, 1, 1, 0, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1
};
@@ -1437,218 +1486,207 @@ yyreduce:
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
- case 6:
-#line 108 "cmFortranParser.y" /* yacc.c:1646 */
+ case 4:
+#line 105 "cmFortranParser.y" /* yacc.c:1646 */
+ {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_SetInInterface(parser, true);
+ }
+#line 1496 "cmFortranParser.cxx" /* yacc.c:1646 */
+ break;
+
+ case 5:
+#line 109 "cmFortranParser.y" /* yacc.c:1646 */
+ {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
+ free((yyvsp[-2].string));
+ }
+#line 1506 "cmFortranParser.cxx" /* yacc.c:1646 */
+ break;
+
+ case 6:
+#line 114 "cmFortranParser.y" /* yacc.c:1646 */
{
- free((yyvsp[-3].string));
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleModule(parser, (yyvsp[-2].string));
+ free((yyvsp[-2].string));
}
-#line 1446 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1516 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 7:
-#line 113 "cmFortranParser.y" /* yacc.c:1646 */
+#line 119 "cmFortranParser.y" /* yacc.c:1646 */
{
- if (cmFortranParserIsKeyword((yyvsp[-1].string), "interface")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_SetInInterface(parser, true);
- }
- free((yyvsp[-1].string));
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_SetInInterface(parser, true);
+ free((yyvsp[-2].string));
}
-#line 1458 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1526 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 8:
-#line 120 "cmFortranParser.y" /* yacc.c:1646 */
+#line 124 "cmFortranParser.y" /* yacc.c:1646 */
{
- if (cmFortranParserIsKeyword((yyvsp[-3].string), "use")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
- } else if (cmFortranParserIsKeyword((yyvsp[-3].string), "module")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleModule(parser, (yyvsp[-2].string));
- } else if (cmFortranParserIsKeyword((yyvsp[-3].string), "interface")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_SetInInterface(parser, true);
- } else if (cmFortranParserIsKeyword((yyvsp[-2].string), "interface") &&
- cmFortranParserIsKeyword((yyvsp[-3].string), "end")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_SetInInterface(parser, false);
- }
- free((yyvsp[-3].string));
- free((yyvsp[-2].string));
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_SetInInterface(parser, false);
}
-#line 1481 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1535 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 9:
-#line 138 "cmFortranParser.y" /* yacc.c:1646 */
+#line 128 "cmFortranParser.y" /* yacc.c:1646 */
{
- if (cmFortranParserIsKeyword((yyvsp[-4].string), "use")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
- }
- free((yyvsp[-4].string));
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1494 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1545 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 10:
-#line 146 "cmFortranParser.y" /* yacc.c:1646 */
+#line 133 "cmFortranParser.y" /* yacc.c:1646 */
{
- if (cmFortranParserIsKeyword((yyvsp[-6].string), "use") &&
- cmFortranParserIsKeyword((yyvsp[-4].string), "non_intrinsic") ) {
+ if (cmsysString_strcasecmp((yyvsp[-4].string), "non_intrinsic") == 0) {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleUse(parser, (yyvsp[-2].string));
}
- free((yyvsp[-6].string));
free((yyvsp[-4].string));
free((yyvsp[-2].string));
}
-#line 1509 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1558 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 11:
-#line 156 "cmFortranParser.y" /* yacc.c:1646 */
+#line 141 "cmFortranParser.y" /* yacc.c:1646 */
{
- if (cmFortranParserIsKeyword((yyvsp[-3].string), "include")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
- }
- free((yyvsp[-3].string));
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1522 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1568 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 12:
-#line 164 "cmFortranParser.y" /* yacc.c:1646 */
+#line 146 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleLineDirective(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1532 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1578 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 13:
-#line 169 "cmFortranParser.y" /* yacc.c:1646 */
+#line 151 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1542 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1588 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 14:
-#line 174 "cmFortranParser.y" /* yacc.c:1646 */
+#line 156 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleInclude(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1552 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1598 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 15:
-#line 179 "cmFortranParser.y" /* yacc.c:1646 */
+#line 161 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleDefine(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1562 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1608 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 16:
-#line 184 "cmFortranParser.y" /* yacc.c:1646 */
+#line 166 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleUndef(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1572 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1618 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 17:
-#line 189 "cmFortranParser.y" /* yacc.c:1646 */
+#line 171 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleIfdef(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1582 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1628 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 18:
-#line 194 "cmFortranParser.y" /* yacc.c:1646 */
+#line 176 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleIfndef(parser, (yyvsp[-2].string));
free((yyvsp[-2].string));
}
-#line 1592 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1638 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 19:
-#line 199 "cmFortranParser.y" /* yacc.c:1646 */
+#line 181 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleIf(parser);
}
-#line 1601 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1647 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 20:
-#line 203 "cmFortranParser.y" /* yacc.c:1646 */
+#line 185 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleElif(parser);
}
-#line 1610 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1656 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 21:
-#line 207 "cmFortranParser.y" /* yacc.c:1646 */
+#line 189 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleElse(parser);
}
-#line 1619 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1665 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
case 22:
-#line 211 "cmFortranParser.y" /* yacc.c:1646 */
+#line 193 "cmFortranParser.y" /* yacc.c:1646 */
{
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleEndif(parser);
}
-#line 1628 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1674 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
- case 23:
+ case 46:
#line 215 "cmFortranParser.y" /* yacc.c:1646 */
- {
- free((yyvsp[-3].string));
- }
-#line 1636 "cmFortranParser.cxx" /* yacc.c:1646 */
- break;
-
- case 48:
-#line 237 "cmFortranParser.y" /* yacc.c:1646 */
{ free ((yyvsp[0].string)); }
-#line 1642 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1680 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
- case 49:
-#line 238 "cmFortranParser.y" /* yacc.c:1646 */
+ case 52:
+#line 221 "cmFortranParser.y" /* yacc.c:1646 */
{ free ((yyvsp[0].string)); }
-#line 1648 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1686 "cmFortranParser.cxx" /* yacc.c:1646 */
break;
-#line 1652 "cmFortranParser.cxx" /* yacc.c:1646 */
+#line 1690 "cmFortranParser.cxx" /* yacc.c:1646 */
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -1878,6 +1916,6 @@ yyreturn:
#endif
return yyresult;
}
-#line 246 "cmFortranParser.y" /* yacc.c:1906 */
+#line 229 "cmFortranParser.y" /* yacc.c:1906 */
/* End of grammar */
diff --git a/Source/cmFortranParser.y b/Source/cmFortranParser.y
index f8d461e..b856a1a 100644
--- a/Source/cmFortranParser.y
+++ b/Source/cmFortranParser.y
@@ -52,12 +52,6 @@ static void cmFortran_yyerror(yyscan_t yyscanner, const char* message)
cmFortranParser_Error(parser, message);
}
-static bool cmFortranParserIsKeyword(const char* word,
- const char* keyword)
-{
- return cmsysString_strcasecmp(word, keyword) == 0;
-}
-
/* Disable some warnings in the generated code. */
#ifdef _MSC_VER
# pragma warning (disable: 4102) /* Unused goto label. */
@@ -95,6 +89,11 @@ static bool cmFortranParserIsKeyword(const char* word,
%token <number> UNTERMINATED_STRING
%token <string> STRING WORD
%token <string> CPP_INCLUDE_ANGLE
+%token END
+%token INCLUDE
+%token INTERFACE
+%token MODULE
+%token USE
/*-------------------------------------------------------------------------*/
/* grammar */
@@ -102,63 +101,46 @@ static bool cmFortranParserIsKeyword(const char* word,
code: /* empty */ | code stmt;
-stmt: keyword_stmt | assignment_stmt;
-
-assignment_stmt:
- WORD ASSIGNMENT_OP other EOSTMT {
- free($1);
+stmt:
+ INTERFACE EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_SetInInterface(parser, true);
}
-
-keyword_stmt:
- WORD EOSTMT {
- if (cmFortranParserIsKeyword($1, "interface")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_SetInInterface(parser, true);
- }
- free($1);
+| USE WORD other EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleUse(parser, $2);
+ free($2);
}
-| WORD WORD other EOSTMT {
- if (cmFortranParserIsKeyword($1, "use")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleUse(parser, $2);
- } else if (cmFortranParserIsKeyword($1, "module")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleModule(parser, $2);
- } else if (cmFortranParserIsKeyword($1, "interface")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_SetInInterface(parser, true);
- } else if (cmFortranParserIsKeyword($2, "interface") &&
- cmFortranParserIsKeyword($1, "end")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_SetInInterface(parser, false);
- }
- free($1);
+| MODULE WORD other EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleModule(parser, $2);
free($2);
}
-| WORD DCOLON WORD other EOSTMT {
- if (cmFortranParserIsKeyword($1, "use")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleUse(parser, $3);
- }
- free($1);
+| INTERFACE WORD other EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_SetInInterface(parser, true);
+ free($2);
+ }
+| END INTERFACE other EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_SetInInterface(parser, false);
+ }
+| USE DCOLON WORD other EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleUse(parser, $3);
free($3);
}
-| WORD COMMA WORD DCOLON WORD other EOSTMT {
- if (cmFortranParserIsKeyword($1, "use") &&
- cmFortranParserIsKeyword($3, "non_intrinsic") ) {
+| USE COMMA WORD DCOLON WORD other EOSTMT {
+ if (cmsysString_strcasecmp($3, "non_intrinsic") == 0) {
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleUse(parser, $5);
}
- free($1);
free($3);
free($5);
}
-| WORD STRING other EOSTMT {
- if (cmFortranParserIsKeyword($1, "include")) {
- cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
- cmFortranParser_RuleInclude(parser, $2);
- }
- free($1);
+| INCLUDE STRING other EOSTMT {
+ cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
+ cmFortranParser_RuleInclude(parser, $2);
free($2);
}
| CPP_LINE_DIRECTIVE STRING other EOSTMT {
@@ -212,12 +194,8 @@ keyword_stmt:
cmFortranParser* parser = cmFortran_yyget_extra(yyscanner);
cmFortranParser_RuleEndif(parser);
}
-| WORD GARBAGE other EOSTMT {
- free($1);
- }
-| GARBAGE other EOSTMT
| EOSTMT
-| error
+| error EOSTMT /* tolerate unknown statements until their end */
;
@@ -235,6 +213,11 @@ other: /* empty */ | other misc_code ;
misc_code:
WORD { free ($1); }
+| END
+| INCLUDE
+| INTERFACE
+| MODULE
+| USE
| STRING { free ($1); }
| GARBAGE
| ASSIGNMENT_OP
diff --git a/Source/cmFortranParserTokens.h b/Source/cmFortranParserTokens.h
index 176f6fe..e988df4 100644
--- a/Source/cmFortranParserTokens.h
+++ b/Source/cmFortranParserTokens.h
@@ -73,7 +73,12 @@ extern int cmFortran_yydebug;
UNTERMINATED_STRING = 283,
STRING = 284,
WORD = 285,
- CPP_INCLUDE_ANGLE = 286
+ CPP_INCLUDE_ANGLE = 286,
+ END = 287,
+ INCLUDE = 288,
+ INTERFACE = 289,
+ MODULE = 290,
+ USE = 291
};
#endif
/* Tokens. */
@@ -106,17 +111,22 @@ extern int cmFortran_yydebug;
#define STRING 284
#define WORD 285
#define CPP_INCLUDE_ANGLE 286
+#define END 287
+#define INCLUDE 288
+#define INTERFACE 289
+#define MODULE 290
+#define USE 291
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
-#line 81 "cmFortranParser.y" /* yacc.c:1909 */
+#line 75 "cmFortranParser.y" /* yacc.c:1909 */
char* string;
-#line 120 "cmFortranParserTokens.h" /* yacc.c:1909 */
+#line 130 "cmFortranParserTokens.h" /* yacc.c:1909 */
};
typedef union YYSTYPE YYSTYPE;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ee2907c..7dd8e7f 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -327,7 +327,6 @@ cmGeneratorTarget::~cmGeneratorTarget()
cmDeleteAll(this->CompileDefinitionsEntries);
cmDeleteAll(this->SourceEntries);
cmDeleteAll(this->LinkInformation);
- this->LinkInformation.clear();
}
cmLocalGenerator* cmGeneratorTarget::GetLocalGenerator() const
@@ -469,9 +468,8 @@ std::string cmGeneratorTarget::GetOutputName(const std::string& config,
return i->second;
}
-void cmGeneratorTarget::AddSource(const std::string& src)
+void cmGeneratorTarget::AddSourceCommon(const std::string& src)
{
- this->Target->AddSource(src);
cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
cmGeneratorExpression ge(lfbt);
CM_AUTO_PTR<cmCompiledGeneratorExpression> cge = ge.Parse(src);
@@ -481,19 +479,17 @@ void cmGeneratorTarget::AddSource(const std::string& src)
this->LinkImplementationLanguageIsContextDependent = true;
}
+void cmGeneratorTarget::AddSource(const std::string& src)
+{
+ this->Target->AddSource(src);
+ this->AddSourceCommon(src);
+}
+
void cmGeneratorTarget::AddTracedSources(std::vector<std::string> const& srcs)
{
this->Target->AddTracedSources(srcs);
if (!srcs.empty()) {
- std::string srcFiles = cmJoin(srcs, ";");
- this->SourceFilesMap.clear();
- this->LinkImplementationLanguageIsContextDependent = true;
- cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();
- cmGeneratorExpression ge(lfbt);
- CM_AUTO_PTR<cmCompiledGeneratorExpression> cge = ge.Parse(srcFiles);
- cge->SetEvaluateForBuildsystem(true);
- this->SourceEntries.push_back(
- new cmGeneratorTarget::TargetPropertyEntry(cge));
+ this->AddSourceCommon(cmJoin(srcs, ";"));
}
}
@@ -840,14 +836,10 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(
&dagChecker, result, excludeImported);
}
- std::set<std::string> unique;
- for (std::vector<std::string>::iterator li = result.begin();
- li != result.end(); ++li) {
- cmSystemTools::ConvertToUnixSlashes(*li);
- unique.insert(*li);
- }
- result.clear();
- result.insert(result.end(), unique.begin(), unique.end());
+ std::for_each(result.begin(), result.end(),
+ cmSystemTools::ConvertToUnixSlashes);
+ std::sort(result.begin(), result.end());
+ result.erase(std::unique(result.begin(), result.end()), result.end());
IncludeCacheType::value_type entry(config_upper, result);
iter = this->SystemIncludesCache.insert(entry).first;
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 173f15d..715220e 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -540,6 +540,8 @@ public:
std::string GetFortranModuleDirectory() const;
private:
+ void AddSourceCommon(const std::string& src);
+
std::string CreateFortranModuleDirectory() const;
mutable bool FortranModuleDirectoryCreated;
mutable std::string FortranModuleDirectory;
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 8bb43ee..ac9c8ef 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -482,6 +482,10 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf)
{
+ if (this->DefaultPlatformToolset == "v100") {
+ // The v100 64-bit toolset does not exist in the express edition.
+ this->DefaultPlatformToolset.clear();
+ }
if (this->GetPlatformToolset()) {
return true;
}
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 694a9f6..a76bed3 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -175,15 +175,14 @@ void cmLocalGenerator::GenerateTestFiles()
(*gi)->Compute(this);
(*gi)->Generate(fout, config, configurationTypes);
}
- size_t i;
- std::vector<cmState::Snapshot> children =
- this->Makefile->GetStateSnapshot().GetChildren();
- for (i = 0; i < children.size(); ++i) {
+ typedef std::vector<cmState::Snapshot> vec_t;
+ vec_t const& children = this->Makefile->GetStateSnapshot().GetChildren();
+ for (vec_t::const_iterator i = children.begin(); i != children.end(); ++i) {
// TODO: Use add_subdirectory instead?
- fout << "subdirs(";
- std::string outP = children[i].GetDirectory().GetCurrentBinary();
- fout << this->ConvertToRelativePath(outP, START_OUTPUT);
- fout << ")" << std::endl;
+ std::string outP = i->GetDirectory().GetCurrentBinary();
+ outP = this->ConvertToRelativePath(outP, START_OUTPUT);
+ outP = cmOutputConverter::EscapeForCMake(outP);
+ fout << "subdirs(" << outP << ")" << std::endl;
}
}
@@ -1531,9 +1530,6 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
linkLibs += " ";
}
- // Write the library flags to the build rule.
- fout << linkLibs;
-
// Check what kind of rpath flags to use.
if (cli.GetRuntimeSep().empty()) {
// Each rpath entry gets its own option ("-R a -R b -R c")
@@ -1560,6 +1556,9 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
}
}
+ // Write the library flags to the build rule.
+ fout << linkLibs;
+
// Add the linker runtime search path if any.
std::string rpath_link = cli.GetRPathLinkString();
if (!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) {
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx
index 8f524ec..f9313c5 100644
--- a/Source/cmParseArgumentsCommand.cxx
+++ b/Source/cmParseArgumentsCommand.cxx
@@ -20,6 +20,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
{
// cmake_parse_arguments(prefix options single multi <ARGN>)
// 1 2 3 4
+ // or
+ // cmake_parse_arguments(PARSE_ARGV N prefix options single multi)
if (args.size() < 4) {
this->SetError("must be called with at least 4 arguments.");
return false;
@@ -27,6 +29,27 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
std::vector<std::string>::const_iterator argIter = args.begin(),
argEnd = args.end();
+ bool parseFromArgV = false;
+ unsigned long argvStart = 0;
+ if (*argIter == "PARSE_ARGV") {
+ if (args.size() != 6) {
+ this->Makefile->IssueMessage(
+ cmake::FATAL_ERROR,
+ "PARSE_ARGV must be called with exactly 6 arguments.");
+ cmSystemTools::SetFatalErrorOccured();
+ return true;
+ }
+ parseFromArgV = true;
+ argIter++; // move past PARSE_ARGV
+ if (!cmSystemTools::StringToULong(argIter->c_str(), &argvStart)) {
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, "PARSE_ARGV index '" +
+ *argIter +
+ "' is not an unsigned integer");
+ cmSystemTools::SetFatalErrorOccured();
+ return true;
+ }
+ argIter++; // move past N
+ }
// the first argument is the prefix
const std::string prefix = (*argIter++) + "_";
@@ -90,11 +113,37 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args,
} insideValues = NONE;
std::string currentArgName;
- // Flatten ;-lists in the arguments into a single list as was done
- // by the original function(CMAKE_PARSE_ARGUMENTS).
list.clear();
- for (; argIter != argEnd; ++argIter) {
- cmSystemTools::ExpandListArgument(*argIter, list);
+ if (!parseFromArgV) {
+ // Flatten ;-lists in the arguments into a single list as was done
+ // by the original function(CMAKE_PARSE_ARGUMENTS).
+ for (; argIter != argEnd; ++argIter) {
+ cmSystemTools::ExpandListArgument(*argIter, list);
+ }
+ } else {
+ // in the PARSE_ARGV move read the arguments from ARGC and ARGV#
+ std::string argc = this->Makefile->GetSafeDefinition("ARGC");
+ unsigned long count;
+ if (!cmSystemTools::StringToULong(argc.c_str(), &count)) {
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ "PARSE_ARGV called with ARGC='" + argc +
+ "' that is not an unsigned integer");
+ cmSystemTools::SetFatalErrorOccured();
+ return true;
+ }
+ for (unsigned long i = argvStart; i < count; ++i) {
+ std::ostringstream argName;
+ argName << "ARGV" << i;
+ const char* arg = this->Makefile->GetDefinition(argName.str());
+ if (!arg) {
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ "PARSE_ARGV called with " +
+ argName.str() + " not set");
+ cmSystemTools::SetFatalErrorOccured();
+ return true;
+ }
+ list.push_back(arg);
+ }
}
// iterate over the arguments list and fill in the values where applicable
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 7da9975..7352217 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1766,9 +1766,7 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile)
if (!GetFileTime(hFrom, &timeCreation, &timeLastAccess, &timeLastWrite)) {
return false;
}
- if (!SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite)) {
- return false;
- }
+ return SetFileTime(hTo, &timeCreation, &timeLastAccess, &timeLastWrite) != 0;
#else
struct stat fromStat;
if (stat(fromFile, &fromStat) < 0) {
@@ -1778,11 +1776,8 @@ bool cmSystemTools::CopyFileTime(const char* fromFile, const char* toFile)
struct utimbuf buf;
buf.actime = fromStat.st_atime;
buf.modtime = fromStat.st_mtime;
- if (utime(toFile, &buf) < 0) {
- return false;
- }
+ return utime(toFile, &buf) >= 0;
#endif
- return true;
}
cmSystemToolsFileTime* cmSystemTools::FileTimeNew()
@@ -1828,16 +1823,11 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t)
if (!h) {
return false;
}
- if (!SetFileTime(h, &t->timeCreation, &t->timeLastAccess,
- &t->timeLastWrite)) {
- return false;
- }
+ return SetFileTime(h, &t->timeCreation, &t->timeLastAccess,
+ &t->timeLastWrite) != 0;
#else
- if (utime(fname, &t->timeBuf) < 0) {
- return false;
- }
+ return utime(fname, &t->timeBuf) >= 0;
#endif
- return true;
}
#ifdef _WIN32
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index 61b74db..a94212c 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -123,6 +123,8 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
formatString += flag;
switch (flag) {
+ case 'a':
+ case 'b':
case 'd':
case 'H':
case 'I':
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index d6bea3d..0d61a3d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -35,7 +35,7 @@
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmGraphVizWriter.h"
#include "cmVariableWatch.h"
-#include <cm_jsoncpp_value.h>
+
#include <cm_jsoncpp_writer.h>
#endif
@@ -233,10 +233,9 @@ cmake::~cmake()
delete this->FileComparison;
}
-std::string cmake::ReportCapabilities() const
-{
- std::string result;
#if defined(CMAKE_BUILD_WITH_CMAKE)
+Json::Value cmake::ReportCapabilitiesJson() const
+{
Json::Value obj = Json::objectValue;
// Version information:
Json::Value version = Json::objectValue;
@@ -287,8 +286,16 @@ std::string cmake::ReportCapabilities() const
#else
obj["serverMode"] = false;
#endif
+ return obj;
+}
+#endif
+
+std::string cmake::ReportCapabilities() const
+{
+ std::string result;
+#if defined(CMAKE_BUILD_WITH_CMAKE)
Json::FastWriter writer;
- result = writer.write(obj);
+ result = writer.write(this->ReportCapabilitiesJson());
#else
result = "Not supported";
#endif
@@ -1039,6 +1046,28 @@ const char* cmake::GetHomeOutputDirectory() const
return this->State->GetBinaryDirectory();
}
+std::string cmake::FindCacheFile(const std::string& binaryDir) const
+{
+ std::string cachePath = binaryDir;
+ cmSystemTools::ConvertToUnixSlashes(cachePath);
+ std::string cacheFile = cachePath;
+ cacheFile += "/CMakeCache.txt";
+ if (!cmSystemTools::FileExists(cacheFile.c_str())) {
+ // search in parent directories for cache
+ std::string cmakeFiles = cachePath;
+ cmakeFiles += "/CMakeFiles";
+ if (cmSystemTools::FileExists(cmakeFiles.c_str())) {
+ std::string cachePathFound =
+ cmSystemTools::FileExistsInParentDirectories("CMakeCache.txt",
+ cachePath.c_str(), "/");
+ if (!cachePathFound.empty()) {
+ cachePath = cmSystemTools::GetFilenamePath(cachePathFound);
+ }
+ }
+ }
+ return cachePath;
+}
+
void cmake::SetGlobalGenerator(cmGlobalGenerator* gg)
{
if (!gg) {
@@ -2337,24 +2366,8 @@ int cmake::Build(const std::string& dir, const std::string& target,
std::cerr << "Error: " << dir << " is not a directory\n";
return 1;
}
- std::string cachePath = dir;
- cmSystemTools::ConvertToUnixSlashes(cachePath);
- std::string cacheFile = cachePath;
- cacheFile += "/CMakeCache.txt";
- if (!cmSystemTools::FileExists(cacheFile.c_str())) {
- // search in parent directories for cache
- std::string cmakeFiles = cachePath;
- cmakeFiles += "/CMakeFiles";
- if (cmSystemTools::FileExists(cmakeFiles.c_str())) {
- std::string cachePathFound =
- cmSystemTools::FileExistsInParentDirectories("CMakeCache.txt",
- cachePath.c_str(), "/");
- if (!cachePathFound.empty()) {
- cachePath = cmSystemTools::GetFilenamePath(cachePathFound);
- }
- }
- }
+ std::string cachePath = FindCacheFile(dir);
if (!this->LoadCache(cachePath)) {
std::cerr << "Error: could not load cache\n";
return 1;
diff --git a/Source/cmake.h b/Source/cmake.h
index 9dc429d..30661d9 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -24,6 +24,10 @@
#include <string>
#include <vector>
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+#include "cm_jsoncpp_value.h"
+#endif
+
class cmExternalMakefileProjectGeneratorFactory;
class cmFileTimeComparison;
class cmGlobalGenerator;
@@ -118,6 +122,9 @@ public:
/// Destructor
~cmake();
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+ Json::Value ReportCapabilitiesJson() const;
+#endif
std::string ReportCapabilities() const;
static const char* GetCMakeFilesDirectory() { return "/CMakeFiles"; }
@@ -186,6 +193,9 @@ public:
return this->GlobalGenerator;
}
+ ///! Return the full path to where the CMakeCache.txt file should be.
+ std::string FindCacheFile(const std::string& binaryDir) const;
+
///! Return the global generator assigned to this instance of cmake
void SetGlobalGenerator(cmGlobalGenerator*);
diff --git a/Templates/cygwin-package.sh.in b/Templates/cygwin-package.sh.in
deleted file mode 100755
index 69b6c0f..0000000
--- a/Templates/cygwin-package.sh.in
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/sh
-
-# this is a sample shell script used for building a cmake
-# based project for a cygwin setup package.
-
-# get the current directory
-TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
-
-# create build directory
-mkdirs()
-{
- (
- mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build"
- )
-}
-
-# cd into
-# untar source tree and apply patch
-prep()
-{
- (
- cd "$TOP_DIR" &&
- tar xvfj @CPACK_PACKAGE_FILE_NAME@.tar.bz2
- patch -p0 < "@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch" &&
- mkdirs
- )
-}
-
-# configure the build tree in .build directory
-# of the source tree
-conf()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- cmake ..
- )
-}
-
-# build the package in the .build directory
-build()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- make &&
- make test
- )
-}
-
-# clean the build tree
-clean()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- make clean
- )
-}
-
-# create the package
-pkg()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- cpack &&
- mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR"
- )
-}
-
-# create the source package
-spkg()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- cpack --config CPackSourceConfig.cmake &&
- mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR"
- )
-}
-
-# clean up
-finish()
-{
- (
- rm -rf "@CPACK_PACKAGE_FILE_NAME@"
- )
-}
-
-case $1 in
- prep) prep ; STATUS=$? ;;
- mkdirs) mkdirs ; STATUS=$? ;;
- conf) conf ; STATUS=$? ;;
- build) build ; STATUS=$? ;;
- clean) clean ; STATUS=$? ;;
- package) pkg ; STATUS=$? ;;
- pkg) pkg ; STATUS=$? ;;
- src-package) spkg ; STATUS=$? ;;
- spkg) spkg ; STATUS=$? ;;
- finish) finish ; STATUS=$? ;;
- all) (
- prep && conf && build && pkg && spkg && finish ;
- STATUS=$?
- ) ;;
- *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;;
-esac
-exit ${STATUS}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 8293286..97770ed 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1356,6 +1356,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
add_subdirectory(FindBoost)
endif()
+ if(CMake_TEST_FindBZip2)
+ add_subdirectory(FindBZip2)
+ endif()
+
if(CMake_TEST_FindGSL)
add_subdirectory(FindGSL)
endif()
@@ -1412,9 +1416,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
# Matlab module
if(CMake_TEST_FindMatlab)
- ADD_TEST_MACRO(FindMatlab.basic_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
- ADD_TEST_MACRO(FindMatlab.versions_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
- ADD_TEST_MACRO(FindMatlab.components_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>)
+ ADD_TEST_MACRO(FindMatlab.basic_checks ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>)
+ ADD_TEST_MACRO(FindMatlab.versions_checks ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>)
+ ADD_TEST_MACRO(FindMatlab.components_checks ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>)
endif()
find_package(GTK2 QUIET)
diff --git a/Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake b/Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake
new file mode 100644
index 0000000..1cd44ff
--- /dev/null
+++ b/Tests/CMakeTests/String-TIMESTAMP-MonthWeekNames.cmake
@@ -0,0 +1,11 @@
+string(TIMESTAMP output "%a;%b")
+message("~${output}~")
+
+list(LENGTH output output_length)
+
+set(expected_output_length 2)
+
+if(NOT output_length EQUAL ${expected_output_length})
+ message(FATAL_ERROR "expected ${expected_output_length} entries in output "
+ "with all specifiers; found ${output_length}")
+endif()
diff --git a/Tests/CMakeTests/StringTest.cmake.in b/Tests/CMakeTests/StringTest.cmake.in
index aba35fe..a45b205 100644
--- a/Tests/CMakeTests/StringTest.cmake.in
+++ b/Tests/CMakeTests/StringTest.cmake.in
@@ -36,6 +36,8 @@ set(TIMESTAMP-IncompleteSpecifier-RESULT 0)
set(TIMESTAMP-IncompleteSpecifier-STDERR "~foobar%~")
set(TIMESTAMP-AllSpecifiers-RESULT 0)
set(TIMESTAMP-AllSpecifiers-STDERR "~[0-9]+(;[0-9]+)*~")
+set(TIMESTAMP-MonthWeekNames-RESULT 0)
+set(TIMESTAMP-MonthWeekNames-STDERR "~[^%]+;[^%]+~")
set(TIMESTAMP-UnixTime-RESULT 0)
set(TIMESTAMP-UnixTime-STDERR "~[1-9][0-9]+~")
@@ -60,6 +62,7 @@ check_cmake_test(String
TIMESTAMP-UnknownSpecifier
TIMESTAMP-IncompleteSpecifier
TIMESTAMP-AllSpecifiers
+ TIMESTAMP-MonthWeekNames
TIMESTAMP-UnixTime
)
diff --git a/Tests/FindBZip2/CMakeLists.txt b/Tests/FindBZip2/CMakeLists.txt
new file mode 100644
index 0000000..0eb3b99
--- /dev/null
+++ b/Tests/FindBZip2/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_test(NAME FindBZip2.Test COMMAND
+ ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/FindBZip2/Test"
+ "${CMake_BINARY_DIR}/Tests/FindBZip2/Test"
+ ${build_generator_args}
+ --build-project TestFindBZip2
+ --build-options ${build_options}
+ --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
+ )
diff --git a/Tests/FindBZip2/Test/CMakeLists.txt b/Tests/FindBZip2/Test/CMakeLists.txt
new file mode 100644
index 0000000..e9cb618
--- /dev/null
+++ b/Tests/FindBZip2/Test/CMakeLists.txt
@@ -0,0 +1,16 @@
+cmake_minimum_required(VERSION 3.4)
+project(TestFindBZip2 C)
+include(CTest)
+
+find_package(BZip2 REQUIRED)
+
+add_definitions(-DCMAKE_EXPECTED_BZip2_VERSION="${BZip2_VERSION_STRING}")
+
+add_executable(test_tgt main.c)
+target_link_libraries(test_tgt BZip2::BZip2)
+add_test(NAME test_tgt COMMAND test_tgt)
+
+add_executable(test_var main.c)
+target_include_directories(test_var PRIVATE ${BZIP2_INCLUDE_DIRS})
+target_link_libraries(test_var PRIVATE ${BZIP2_LIBRARIES})
+add_test(NAME test_var COMMAND test_var)
diff --git a/Tests/FindBZip2/Test/main.c b/Tests/FindBZip2/Test/main.c
new file mode 100644
index 0000000..8e24c94
--- /dev/null
+++ b/Tests/FindBZip2/Test/main.c
@@ -0,0 +1,23 @@
+#include <bzlib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int main()
+{
+ int chunksize = 1024;
+ FILE* file = fopen("test.bzip2", "wb");
+ char* buf = malloc(sizeof(char) * chunksize);
+ int error, rsize;
+ unsigned int in, out;
+ BZFILE* bzfile = BZ2_bzWriteOpen(&error, file, 64, 1, 10);
+
+ /* Don't actually write anything for the purposes of the test */
+
+ BZ2_bzWriteClose(&error, bzfile, 1, &in, &out);
+ free(buf);
+ fclose(file);
+
+ remove("test.bzip2");
+
+ return 0;
+}
diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake
new file mode 100644
index 0000000..7182cdf
--- /dev/null
+++ b/Tests/RunCMake/GenerateExportHeader/GEH-failures.cmake
@@ -0,0 +1,67 @@
+set(failure_test_executables
+ ${CMAKE_CURRENT_BINARY_DIR}/failure_test_targets)
+file(WRITE ${failure_test_executables} "")
+
+# Check if we should do anything. If the compiler doesn't support hidden
+# visibility, the failure tests won't fail, so just write an empty targets
+# list and punt.
+if(NOT WIN32 AND NOT CYGWIN AND NOT COMPILER_HAS_HIDDEN_VISIBILITY)
+ return()
+endif()
+
+# Read the input source file
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/exportheader_test.cpp content_post)
+set(content_pre "")
+
+# Generate source files for failure test executables
+set(counter 0)
+while(1)
+ # Find first occurrence of link error marker in remaining content
+ string(REGEX MATCH "//([^;\n]+;) LINK ERROR( [(][^)]+[)])?\n(.*)"
+ match "${content_post}")
+ if(match STREQUAL "")
+ # No more matches
+ break()
+ endif()
+
+ # Shift content buffers and extract failing statement
+ string(LENGTH "${content_post}" content_post_length)
+ string(LENGTH "${match}" matched_length)
+ math(EXPR shift_length "${content_post_length} - ${matched_length}")
+
+ string(SUBSTRING "${content_post}" 0 ${shift_length} shift)
+ set(content_pre "${content_pre}${shift}")
+ set(content_post "${CMAKE_MATCH_3}")
+ set(content_active "//${CMAKE_MATCH_1} LINK ERROR${CMAKE_MATCH_2}")
+ set(statement "${CMAKE_MATCH_1}")
+
+ # Check if potential error is conditional, and evaluate condition if so
+ string(REGEX REPLACE " [(]([^)]+)[)]" "\\1" condition "${CMAKE_MATCH_2}")
+ if(NOT condition STREQUAL "")
+ string(REGEX REPLACE " +" ";" condition "${condition}")
+ if(${condition})
+ else()
+ message(STATUS "Not testing '${statement}'; "
+ "condition (${condition}) is FALSE")
+ set(content_pre "${content_pre}// link error removed\n")
+ continue()
+ endif()
+ endif()
+
+ if(NOT skip)
+ message(STATUS "Creating failure test for '${statement}'")
+ math(EXPR counter "${counter} + 1")
+
+ # Write new source file
+ set(out ${CMAKE_CURRENT_BINARY_DIR}/exportheader_failtest-${counter}.cpp)
+ file(WRITE ${out} "${content_pre}${statement}\n${content_post}")
+
+ # Add executable for failure test
+ add_executable(GEH-fail-${counter} EXCLUDE_FROM_ALL ${out})
+ target_link_libraries(GEH-fail-${counter} ${link_libraries})
+ file(APPEND ${failure_test_executables} "GEH-fail-${counter}\n")
+ endif()
+
+ # Add placeholder where failing statement was removed
+ set(content_pre "${content_pre}${content_active}\n")
+endwhile()
diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt
new file mode 100644
index 0000000..d197c91
--- /dev/null
+++ b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-result.txt
@@ -0,0 +1 @@
+[^0]
diff --git a/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt
new file mode 100644
index 0000000..8d98f9d
--- /dev/null
+++ b/Tests/RunCMake/GenerateExportHeader/GEH-link-error-stderr.txt
@@ -0,0 +1 @@
+.*
diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake
index ee0871b..cddba29 100644
--- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake
@@ -123,3 +123,5 @@ target_compile_definitions(GenerateExportHeader
"SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\""
"BIN_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\""
)
+
+include(${CMAKE_CURRENT_LIST_DIR}/GEH-failures.cmake)
diff --git a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
index e534c1f..9423ef5 100644
--- a/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GenerateExportHeader/RunCMakeTest.cmake
@@ -12,6 +12,16 @@ function(run_GEH)
run_cmake(GEH)
run_cmake_command(GEH-build ${CMAKE_COMMAND} --build . --config Debug)
run_cmake_command(GEH-run ${RunCMake_TEST_BINARY_DIR}/GenerateExportHeader)
+
+ file(STRINGS "${RunCMake_TEST_BINARY_DIR}/failure_test_targets"
+ failure_test_targets)
+
+ foreach(failure_test_target ${failure_test_targets})
+ run_cmake_command(GEH-link-error ${CMAKE_COMMAND}
+ --build .
+ --config Debug
+ --target ${failure_test_target})
+ endforeach()
endfunction()
run_GEH()
diff --git a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
index 26bea7e..7e3e0e4 100644
--- a/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
+++ b/Tests/RunCMake/GenerateExportHeader/exportheader_test.cpp
@@ -3,14 +3,6 @@
#include "libstatic.h"
-// #define BUILD_FAIL
-
-#ifndef BUILD_FAIL
-#define DOES_NOT_BUILD(function)
-#else
-#define DOES_NOT_BUILD(function) function
-#endif
-
#include <fstream>
#include <iostream>
#include <stdlib.h>
@@ -64,74 +56,114 @@ void compare(const char* refName, const char* testName)
int main()
{
{
- Libshared l;
- l.libshared();
- l.libshared_exported();
- l.libshared_deprecated();
- l.libshared_not_exported();
-
- DOES_NOT_BUILD(l.libshared_excluded();)
+ libshared::Class l;
+ // l.method(); LINK ERROR
+ l.method_exported();
+ // l.method_deprecated(); LINK ERROR
+ l.method_deprecated_exported();
+ // l.method_excluded(); LINK ERROR
+
+ // use_int(l.data); LINK ERROR
+ use_int(l.data_exported);
+ // use_int(l.data_excluded); LINK ERROR
}
{
- LibsharedNotExported l;
- DOES_NOT_BUILD(l.libshared();)
- l.libshared_exported();
- l.libshared_deprecated();
- DOES_NOT_BUILD(l.libshared_not_exported();)
- DOES_NOT_BUILD(l.libshared_excluded();)
+ libshared::ExportedClass l;
+ l.method();
+ l.method_deprecated();
+#if defined(_WIN32) || defined(__CYGWIN__)
+ l.method_excluded();
+#else
+// l.method_excluded(); LINK ERROR (NOT WIN32 AND NOT CYGWIN)
+#endif
+
+ use_int(l.data);
+#if defined(_WIN32) || defined(__CYGWIN__)
+ use_int(l.data_excluded);
+#else
+// use_int(l.data_excluded); LINK ERROR (NOT WIN32 AND NOT CYGWIN)
+#endif
}
{
- LibsharedExcluded l;
- DOES_NOT_BUILD(l.libshared();)
- l.libshared_exported();
- l.libshared_deprecated();
- DOES_NOT_BUILD(l.libshared_not_exported();)
- DOES_NOT_BUILD(l.libshared_excluded();)
+ libshared::ExcludedClass l;
+ // l.method(); LINK ERROR
+ l.method_exported();
+ // l.method_deprecated(); LINK ERROR
+ l.method_deprecated_exported();
+ // l.method_excluded(); LINK ERROR
+
+ // use_int(l.data); LINK ERROR
+ use_int(l.data_exported);
+ // use_int(l.data_excluded); LINK ERROR
}
- libshared_exported();
- libshared_deprecated();
- DOES_NOT_BUILD(libshared_not_exported();)
- DOES_NOT_BUILD(libshared_excluded();)
+ // libshared::function(); LINK ERROR
+ libshared::function_exported();
+ // libshared::function_deprecated(); LINK ERROR
+ libshared::function_deprecated_exported();
+ // libshared::function_excluded(); LINK ERROR
+
+ // use_int(libshared::data); LINK ERROR
+ use_int(libshared::data_exported);
+ // use_int(libshared::data_excluded); LINK ERROR
{
- Libstatic l;
- l.libstatic();
- l.libstatic_exported();
- l.libstatic_deprecated();
- l.libstatic_not_exported();
- l.libstatic_excluded();
+ libstatic::Class l;
+ l.method();
+ l.method_exported();
+ l.method_deprecated();
+ l.method_deprecated_exported();
+ l.method_excluded();
+
+ use_int(l.data);
+ use_int(l.data_exported);
+ use_int(l.data_excluded);
}
{
- LibstaticNotExported l;
- l.libstatic();
- l.libstatic_exported();
- l.libstatic_deprecated();
- l.libstatic_not_exported();
- l.libstatic_excluded();
+ libstatic::ExportedClass l;
+ l.method();
+ l.method_exported();
+ l.method_deprecated();
+ l.method_deprecated_exported();
+ l.method_excluded();
+
+ use_int(l.data);
+ use_int(l.data_exported);
+ use_int(l.data_excluded);
}
{
- LibstaticExcluded l;
- l.libstatic();
- l.libstatic_exported();
- l.libstatic_deprecated();
- l.libstatic_not_exported();
- l.libstatic_excluded();
+ libstatic::ExcludedClass l;
+ l.method();
+ l.method_exported();
+ l.method_deprecated();
+ l.method_deprecated_exported();
+ l.method_excluded();
+
+ use_int(l.data);
+ use_int(l.data_exported);
+ use_int(l.data_excluded);
}
- libstatic_exported();
- libstatic_deprecated();
- libstatic_not_exported();
- libstatic_excluded();
+ libstatic::function();
+ libstatic::function_exported();
+ libstatic::function_deprecated();
+ libstatic::function_deprecated_exported();
+ libstatic::function_excluded();
+
+ use_int(libstatic::data);
+ use_int(libstatic::data_exported);
+ use_int(libstatic::data_excluded);
+#if defined(SRC_DIR) && defined(BIN_DIR)
compare(SRC_DIR "/libshared_export.h",
BIN_DIR "/libshared/libshared_export.h");
compare(SRC_DIR "/libstatic_export.h",
BIN_DIR "/libstatic/libstatic_export.h");
+#endif
return 0;
}
diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
index 846c207..9ac8381 100644
--- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
+++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
@@ -1,106 +1,121 @@
-
#include "libshared_and_static.h"
#ifndef MY_CUSTOM_CONTENT_ADDED
#error "MY_CUSTOM_CONTENT_ADDED not defined!"
#endif
-int LibsharedAndStatic::libshared_and_static() const
+int libshared_and_static::Class::method() const
{
return 0;
}
-int LibsharedAndStatic::libshared_and_static_exported() const
+int libshared_and_static::Class::method_exported() const
{
return 0;
}
-int LibsharedAndStatic::libshared_and_static_deprecated() const
+int libshared_and_static::Class::method_deprecated() const
{
return 0;
}
-int LibsharedAndStatic::libshared_and_static_not_exported() const
+int libshared_and_static::Class::method_deprecated_exported() const
{
return 0;
}
-int LibsharedAndStatic::libshared_and_static_excluded() const
+int libshared_and_static::Class::method_excluded() const
{
return 0;
}
-int LibsharedAndStaticNotExported::libshared_and_static() const
-{
- return 0;
-}
+int const libshared_and_static::Class::data = 1;
-int LibsharedAndStaticNotExported::libshared_and_static_exported() const
+int const libshared_and_static::Class::data_exported = 1;
+
+int const libshared_and_static::Class::data_excluded = 1;
+
+int libshared_and_static::ExportedClass::method() const
{
return 0;
}
-int LibsharedAndStaticNotExported::libshared_and_static_deprecated() const
+int libshared_and_static::ExportedClass::method_deprecated() const
{
return 0;
}
-int LibsharedAndStaticNotExported::libshared_and_static_not_exported() const
+int libshared_and_static::ExportedClass::method_excluded() const
{
return 0;
}
-int LibsharedAndStaticNotExported::libshared_and_static_excluded() const
+int const libshared_and_static::ExportedClass::data = 1;
+
+int const libshared_and_static::ExportedClass::data_excluded = 1;
+
+int libshared_and_static::ExcludedClass::method() const
{
return 0;
}
-int LibsharedAndStaticExcluded::libshared_and_static() const
+int libshared_and_static::ExcludedClass::method_exported() const
{
return 0;
}
-int LibsharedAndStaticExcluded::libshared_and_static_exported() const
+int libshared_and_static::ExcludedClass::method_deprecated() const
{
return 0;
}
-int LibsharedAndStaticExcluded::libshared_and_static_deprecated() const
+int libshared_and_static::ExcludedClass::method_deprecated_exported() const
{
return 0;
}
-int LibsharedAndStaticExcluded::libshared_and_static_not_exported() const
+int libshared_and_static::ExcludedClass::method_excluded() const
{
return 0;
}
-int LibsharedAndStaticExcluded::libshared_and_static_excluded() const
+int const libshared_and_static::ExcludedClass::data = 1;
+
+int const libshared_and_static::ExcludedClass::data_exported = 1;
+
+int const libshared_and_static::ExcludedClass::data_excluded = 1;
+
+int libshared_and_static::function()
{
return 0;
}
-int libshared_and_static()
+int libshared_and_static::function_exported()
{
return 0;
}
-int libshared_and_static_exported()
+int libshared_and_static::function_deprecated()
{
return 0;
}
-int libshared_and_static_deprecated()
+int libshared_and_static::function_deprecated_exported()
{
return 0;
}
-int libshared_and_static_not_exported()
+int libshared_and_static::function_excluded()
{
return 0;
}
-int libshared_and_static_excluded()
+int const libshared_and_static::data = 1;
+
+int const libshared_and_static::data_exported = 1;
+
+int const libshared_and_static::data_excluded = 1;
+
+void use_int(int)
{
- return 0;
}
diff --git a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h
index ea672fe..2c3fcfd 100644
--- a/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h
+++ b/Tests/RunCMake/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h
@@ -1,66 +1,83 @@
-
-#ifndef SHARED_AND_STATIC_H
-#define SHARED_AND_STATIC_H
+#ifndef LIBSHARED_AND_STATIC_H
+#define LIBSHARED_AND_STATIC_H
#include "libshared_and_static_export.h"
-class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT LibsharedAndStatic
+namespace libshared_and_static {
+
+class Class
{
public:
- int libshared_and_static() const;
+ int method() const;
+
+ int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const;
+
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const;
- int libshared_and_static_exported() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT
+ method_deprecated_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
- libshared_and_static_deprecated() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const;
- int libshared_and_static_not_exported() const;
+ static int const data;
- int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
- libshared_and_static_excluded() const;
+ static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported;
+
+ static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
};
-class LibsharedAndStaticNotExported
+class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT ExportedClass
{
public:
- int libshared_and_static() const;
+ int method() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT
- libshared_and_static_exported() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
- libshared_and_static_deprecated() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const;
- int libshared_and_static_not_exported() const;
+ static int const data;
- int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
- libshared_and_static_excluded() const;
+ static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
};
-class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT LibsharedAndStaticExcluded
+class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT ExcludedClass
{
public:
- int libshared_and_static() const;
+ int method() const;
+
+ int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT method_exported() const;
+
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED method_deprecated() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT
- libshared_and_static_exported() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT
+ method_deprecated_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
- libshared_and_static_deprecated() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT method_excluded() const;
- int libshared_and_static_not_exported() const;
+ static int const data;
- int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
- libshared_and_static_excluded() const;
+ static int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported;
+
+ static int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
};
-MYPREFIX_LIBSHARED_AND_STATIC_EXPORT int libshared_and_static_exported();
+int function();
+
+int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT function_exported();
+
+int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED function_deprecated();
+
+int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT
+function_deprecated_exported();
+
+int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT function_excluded();
+
+extern int const data;
-MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT int
-libshared_and_static_deprecated();
+extern int const MYPREFIX_LIBSHARED_AND_STATIC_EXPORT data_exported;
-int libshared_and_static_not_exported();
+extern int const MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT data_excluded;
-int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT libshared_and_static_excluded();
+} // namespace libshared_and_static
#endif
diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp
index ad6d356..328ef6f 100644
--- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp
+++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.cpp
@@ -1,102 +1,117 @@
-
#include "libshared.h"
-int Libshared::libshared() const
+int libshared::Class::method() const
{
return 0;
}
-int Libshared::libshared_exported() const
+int libshared::Class::method_exported() const
{
return 0;
}
-int Libshared::libshared_deprecated() const
+int libshared::Class::method_deprecated() const
{
return 0;
}
-int Libshared::libshared_not_exported() const
+int libshared::Class::method_deprecated_exported() const
{
return 0;
}
-int Libshared::libshared_excluded() const
+int libshared::Class::method_excluded() const
{
return 0;
}
-int LibsharedNotExported::libshared() const
-{
- return 0;
-}
+int const libshared::Class::data = 1;
-int LibsharedNotExported::libshared_exported() const
+int const libshared::Class::data_exported = 1;
+
+int const libshared::Class::data_excluded = 1;
+
+int libshared::ExportedClass::method() const
{
return 0;
}
-int LibsharedNotExported::libshared_deprecated() const
+int libshared::ExportedClass::method_deprecated() const
{
return 0;
}
-int LibsharedNotExported::libshared_not_exported() const
+int libshared::ExportedClass::method_excluded() const
{
return 0;
}
-int LibsharedNotExported::libshared_excluded() const
+int const libshared::ExportedClass::data = 1;
+
+int const libshared::ExportedClass::data_excluded = 1;
+
+int libshared::ExcludedClass::method() const
{
return 0;
}
-int LibsharedExcluded::libshared() const
+int libshared::ExcludedClass::method_exported() const
{
return 0;
}
-int LibsharedExcluded::libshared_exported() const
+int libshared::ExcludedClass::method_deprecated() const
{
return 0;
}
-int LibsharedExcluded::libshared_deprecated() const
+int libshared::ExcludedClass::method_deprecated_exported() const
{
return 0;
}
-int LibsharedExcluded::libshared_not_exported() const
+int libshared::ExcludedClass::method_excluded() const
{
return 0;
}
-int LibsharedExcluded::libshared_excluded() const
+int const libshared::ExcludedClass::data = 1;
+
+int const libshared::ExcludedClass::data_exported = 1;
+
+int const libshared::ExcludedClass::data_excluded = 1;
+
+int libshared::function()
{
return 0;
}
-int libshared()
+int libshared::function_exported()
{
return 0;
}
-int libshared_exported()
+int libshared::function_deprecated()
{
return 0;
}
-int libshared_deprecated()
+int libshared::function_deprecated_exported()
{
return 0;
}
-int libshared_not_exported()
+int libshared::function_excluded()
{
return 0;
}
-int libshared_excluded()
+int const libshared::data = 1;
+
+int const libshared::data_exported = 1;
+
+int const libshared::data_excluded = 1;
+
+void use_int(int)
{
- return 0;
}
diff --git a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h
index bd9f2e3..6574bd5 100644
--- a/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h
+++ b/Tests/RunCMake/GenerateExportHeader/libshared/libshared.h
@@ -1,57 +1,82 @@
-
#ifndef LIBSHARED_H
#define LIBSHARED_H
#include "libshared_export.h"
-class LIBSHARED_EXPORT Libshared
+namespace libshared {
+
+class Class
{
public:
- int libshared() const;
+ int method() const;
+
+ int LIBSHARED_EXPORT method_exported() const;
+
+ int LIBSHARED_DEPRECATED method_deprecated() const;
- int libshared_exported() const;
+ int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const;
- int LIBSHARED_DEPRECATED libshared_deprecated() const;
+ int LIBSHARED_NO_EXPORT method_excluded() const;
- int libshared_not_exported() const;
+ static int const data;
- int LIBSHARED_NO_EXPORT libshared_excluded() const;
+ static int const LIBSHARED_EXPORT data_exported;
+
+ static int const LIBSHARED_NO_EXPORT data_excluded;
};
-class LibsharedNotExported
+class LIBSHARED_EXPORT ExportedClass
{
public:
- int libshared() const;
+ int method() const;
- int LIBSHARED_EXPORT libshared_exported() const;
+ int LIBSHARED_DEPRECATED method_deprecated() const;
- int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const;
+ int LIBSHARED_NO_EXPORT method_excluded() const;
- int libshared_not_exported() const;
+ static int const data;
- int LIBSHARED_NO_EXPORT libshared_excluded() const;
+ static int const LIBSHARED_NO_EXPORT data_excluded;
};
-class LIBSHARED_NO_EXPORT LibsharedExcluded
+class LIBSHARED_NO_EXPORT ExcludedClass
{
public:
- int libshared() const;
+ int method() const;
+
+ int LIBSHARED_EXPORT method_exported() const;
+
+ int LIBSHARED_DEPRECATED method_deprecated() const;
- int LIBSHARED_EXPORT libshared_exported() const;
+ int LIBSHARED_DEPRECATED_EXPORT method_deprecated_exported() const;
- int LIBSHARED_DEPRECATED_EXPORT libshared_deprecated() const;
+ int LIBSHARED_NO_EXPORT method_excluded() const;
- int libshared_not_exported() const;
+ static int const data;
- int LIBSHARED_NO_EXPORT libshared_excluded() const;
+ static int const LIBSHARED_EXPORT data_exported;
+
+ static int const LIBSHARED_NO_EXPORT data_excluded;
};
-LIBSHARED_EXPORT int libshared_exported();
+int function();
+
+int LIBSHARED_EXPORT function_exported();
+
+int LIBSHARED_DEPRECATED function_deprecated();
+
+int LIBSHARED_DEPRECATED_EXPORT function_deprecated_exported();
+
+int LIBSHARED_NO_EXPORT function_excluded();
+
+extern int const data;
+
+extern int const LIBSHARED_EXPORT data_exported;
-LIBSHARED_DEPRECATED_EXPORT int libshared_deprecated();
+extern int const LIBSHARED_NO_EXPORT data_excluded;
-int libshared_not_exported();
+} // namespace libshared
-int LIBSHARED_NO_EXPORT libshared_excluded();
+LIBSHARED_EXPORT void use_int(int);
#endif
diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp
index 89381af..e1d1255 100644
--- a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp
+++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.cpp
@@ -1,97 +1,125 @@
-
#include "libstatic.h"
-int Libstatic::libstatic() const
+int libstatic::Class::method() const
{
return 0;
}
-int Libstatic::libstatic_exported() const
+int libstatic::Class::method_exported() const
{
return 0;
}
-int Libstatic::libstatic_deprecated() const
+int libstatic::Class::method_deprecated() const
{
return 0;
}
-int Libstatic::libstatic_not_exported() const
+int libstatic::Class::method_deprecated_exported() const
{
return 0;
}
-int Libstatic::libstatic_excluded() const
+int libstatic::Class::method_excluded() const
{
return 0;
}
-int LibstaticNotExported::libstatic() const
+int const libstatic::Class::data = 1;
+
+int const libstatic::Class::data_exported = 1;
+
+int const libstatic::Class::data_excluded = 1;
+
+int libstatic::ExportedClass::method() const
{
return 0;
}
-int LibstaticNotExported::libstatic_exported() const
+int libstatic::ExportedClass::method_exported() const
{
return 0;
}
-int LibstaticNotExported::libstatic_deprecated() const
+int libstatic::ExportedClass::method_deprecated() const
{
return 0;
}
-int LibstaticNotExported::libstatic_not_exported() const
+int libstatic::ExportedClass::method_deprecated_exported() const
{
return 0;
}
-int LibstaticNotExported::libstatic_excluded() const
+int libstatic::ExportedClass::method_excluded() const
{
return 0;
}
-int LibstaticExcluded::libstatic() const
+int const libstatic::ExportedClass::data = 1;
+
+int const libstatic::ExportedClass::data_exported = 1;
+
+int const libstatic::ExportedClass::data_excluded = 1;
+
+int libstatic::ExcludedClass::method() const
{
return 0;
}
-int LibstaticExcluded::libstatic_exported() const
+int libstatic::ExcludedClass::method_exported() const
{
return 0;
}
-int LibstaticExcluded::libstatic_deprecated() const
+int libstatic::ExcludedClass::method_deprecated() const
{
return 0;
}
-int LibstaticExcluded::libstatic_not_exported() const
+int libstatic::ExcludedClass::method_deprecated_exported() const
{
return 0;
}
-int LibstaticExcluded::libstatic_excluded() const
+int libstatic::ExcludedClass::method_excluded() const
{
return 0;
}
-int libstatic_exported()
+int const libstatic::ExcludedClass::data = 1;
+
+int const libstatic::ExcludedClass::data_exported = 1;
+
+int const libstatic::ExcludedClass::data_excluded = 1;
+
+int libstatic::function()
+{
+ return 0;
+}
+
+int libstatic::function_exported()
{
return 0;
}
-int libstatic_deprecated()
+int libstatic::function_deprecated()
{
return 0;
}
-int libstatic_not_exported()
+int libstatic::function_deprecated_exported()
{
return 0;
}
-int libstatic_excluded()
+int libstatic::function_excluded()
{
return 0;
}
+
+int const libstatic::data = 1;
+
+int const libstatic::data_exported = 1;
+
+int const libstatic::data_excluded = 1;
diff --git a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h
index 6072d9b..1017e12 100644
--- a/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h
+++ b/Tests/RunCMake/GenerateExportHeader/libstatic/libstatic.h
@@ -1,57 +1,86 @@
-
#ifndef LIBSTATIC_H
#define LIBSTATIC_H
#include "libstatic_export.h"
-class LIBSTATIC_EXPORT Libstatic
+namespace libstatic {
+
+class Class
{
public:
- int libstatic() const;
+ int method() const;
+
+ int LIBSTATIC_EXPORT method_exported() const;
+
+ int LIBSTATIC_DEPRECATED method_deprecated() const;
- int libstatic_exported() const;
+ int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const;
- int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
+ int LIBSTATIC_NO_EXPORT method_excluded() const;
- int libstatic_not_exported() const;
+ static int const data;
- int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
+ static int const LIBSTATIC_EXPORT data_exported;
+
+ static int const LIBSTATIC_NO_EXPORT data_excluded;
};
-class LibstaticNotExported
+class LIBSTATIC_EXPORT ExportedClass
{
public:
- int libstatic() const;
+ int method() const;
+
+ int LIBSTATIC_EXPORT method_exported() const;
+
+ int LIBSTATIC_DEPRECATED method_deprecated() const;
+
+ int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const;
- int LIBSTATIC_EXPORT libstatic_exported() const;
+ int LIBSTATIC_NO_EXPORT method_excluded() const;
- int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
+ static int const data;
- int libstatic_not_exported() const;
+ static int const LIBSTATIC_EXPORT data_exported;
- int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
+ static int const LIBSTATIC_NO_EXPORT data_excluded;
};
-class LIBSTATIC_NO_EXPORT LibstaticExcluded
+class LIBSTATIC_NO_EXPORT ExcludedClass
{
public:
- int libstatic() const;
+ int method() const;
- int LIBSTATIC_EXPORT libstatic_exported() const;
+ int LIBSTATIC_EXPORT method_exported() const;
- int LIBSTATIC_DEPRECATED libstatic_deprecated() const;
+ int LIBSTATIC_DEPRECATED method_deprecated() const;
- int libstatic_not_exported() const;
+ int LIBSTATIC_DEPRECATED_EXPORT method_deprecated_exported() const;
- int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
+ int LIBSTATIC_NO_EXPORT method_excluded() const;
+
+ static int const data;
+
+ static int const LIBSTATIC_EXPORT data_exported;
+
+ static int const LIBSTATIC_NO_EXPORT data_excluded;
};
-LIBSTATIC_EXPORT int libstatic_exported();
+int function();
+
+int LIBSTATIC_EXPORT function_exported();
+
+int LIBSTATIC_DEPRECATED function_deprecated();
+
+int LIBSTATIC_DEPRECATED_EXPORT function_deprecated_exported();
+
+int LIBSTATIC_NO_EXPORT function_excluded();
+
+extern int const data;
-LIBSTATIC_DEPRECATED_EXPORT int libstatic_deprecated();
+extern int const LIBSTATIC_EXPORT data_exported;
-int libstatic_not_exported();
+extern int const LIBSTATIC_NO_EXPORT data_excluded;
-int LIBSTATIC_NO_EXPORT libstatic_excluded();
+} // namespace libstatic
#endif
diff --git a/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake b/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake
new file mode 100644
index 0000000..61bde03
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/ArgvN.cmake
@@ -0,0 +1,30 @@
+include(${CMAKE_CURRENT_LIST_DIR}/test_utils.cmake)
+
+function(test1)
+ cmake_parse_arguments(PARSE_ARGV 0
+ pref "OPT1;OPT2" "SINGLE1;SINGLE2" "MULTI1;MULTI2")
+
+ TEST(pref_OPT1 TRUE)
+ TEST(pref_OPT2 FALSE)
+ TEST(pref_SINGLE1 "foo;bar")
+ TEST(pref_SINGLE2 UNDEFINED)
+ TEST(pref_MULTI1 bar foo bar)
+ TEST(pref_MULTI2 UNDEFINED)
+ TEST(pref_UNPARSED_ARGUMENTS UNDEFINED)
+endfunction()
+test1(OPT1 SINGLE1 "foo;bar" MULTI1 bar foo bar)
+
+function(test2 arg1)
+ cmake_parse_arguments(PARSE_ARGV 1
+ pref "OPT1;OPT2" "SINGLE1;SINGLE2" "MULTI1;MULTI2")
+
+ TEST(arg1 "first named")
+ TEST(pref_OPT1 TRUE)
+ TEST(pref_OPT2 FALSE)
+ TEST(pref_SINGLE1 "foo;bar")
+ TEST(pref_SINGLE2 UNDEFINED)
+ TEST(pref_MULTI1 bar foo bar)
+ TEST(pref_MULTI2 UNDEFINED)
+ TEST(pref_UNPARSED_ARGUMENTS UNDEFINED)
+endfunction()
+test2("first named" OPT1 SINGLE1 "foo;bar" MULTI1 bar foo bar)
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt
new file mode 100644
index 0000000..e44ab4d
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at BadArgvN1.cmake:[0-9]+ \(cmake_parse_arguments\):
+ PARSE_ARGV must be called with exactly 6 arguments.
+Call Stack \(most recent call first\):
+ BadArgvN1.cmake:[0-9]+ \(test1\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake
new file mode 100644
index 0000000..f894130
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN1.cmake
@@ -0,0 +1,4 @@
+function(test1)
+ cmake_parse_arguments(PARSE_ARGV 0 pref "" "" "" extra)
+endfunction()
+test1()
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt
new file mode 100644
index 0000000..1dde86d
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Error at BadArgvN2.cmake:[0-9]+ \(cmake_parse_arguments\):
+ PARSE_ARGV index 'pref' is not an unsigned integer
+Call Stack \(most recent call first\):
+ BadArgvN2.cmake:[0-9]+ \(test2\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake
new file mode 100644
index 0000000..d20c2c8
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN2.cmake
@@ -0,0 +1,4 @@
+function(test2)
+ cmake_parse_arguments(PARSE_ARGV pref "" "" "" extra)
+endfunction()
+test2()
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt
new file mode 100644
index 0000000..5a30dc9
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at BadArgvN3.cmake:[0-9]+ \(cmake_parse_arguments\):
+ PARSE_ARGV called with ARGC='' that is not an unsigned integer
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake
new file mode 100644
index 0000000..8fb3fdd
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN3.cmake
@@ -0,0 +1 @@
+cmake_parse_arguments(PARSE_ARGV 0 pref "" "" "")
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-result.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt
new file mode 100644
index 0000000..f4bdac4
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Error at BadArgvN4.cmake:[0-9]+ \(cmake_parse_arguments\):
+ PARSE_ARGV called with ARGV0 not set
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake
new file mode 100644
index 0000000..b887a28
--- /dev/null
+++ b/Tests/RunCMake/cmake_parse_arguments/BadArgvN4.cmake
@@ -0,0 +1,3 @@
+set(ARGC 1)
+cmake_parse_arguments(PARSE_ARGV 0 pref "" "" "")
+unset(ARGC)
diff --git a/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake b/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake
index b89f1a5..22d7ee4 100644
--- a/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake
+++ b/Tests/RunCMake/cmake_parse_arguments/RunCMakeTest.cmake
@@ -5,3 +5,8 @@ run_cmake(Initialization)
run_cmake(Mix)
run_cmake(CornerCases)
run_cmake(Errors)
+run_cmake(ArgvN)
+run_cmake(BadArgvN1)
+run_cmake(BadArgvN2)
+run_cmake(BadArgvN3)
+run_cmake(BadArgvN4)
diff --git a/Utilities/Release/Cygwin/cygwin-patch.diff.in b/Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt
index e69de29..e69de29 100644
--- a/Utilities/Release/Cygwin/cygwin-patch.diff.in
+++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument-result.txt
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt
new file mode 100644
index 0000000..82a78c9
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning \(dev\) at DOWNLOAD-unused-argument.cmake:[0-9]+ \(file\):
+ Unexpected argument: JUNK
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake
new file mode 100644
index 0000000..2e3fbe1
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake
@@ -0,0 +1,5 @@
+file(DOWNLOAD
+ "file://${CMAKE_CURRENT_SOURCE_DIR}/DOWNLOAD-unused-argument.txt"
+ "${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
+ JUNK
+ )
diff --git a/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt b/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/file/DOWNLOAD-unused-argument.txt
diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake
index 5f85bba..4c05f24 100644
--- a/Tests/RunCMake/file/RunCMakeTest.cmake
+++ b/Tests/RunCMake/file/RunCMakeTest.cmake
@@ -1,6 +1,8 @@
include(RunCMake)
run_cmake(DOWNLOAD-hash-mismatch)
+run_cmake(DOWNLOAD-unused-argument)
+run_cmake(UPLOAD-unused-argument)
run_cmake(INSTALL-DIRECTORY)
run_cmake(INSTALL-MESSAGE-bad)
run_cmake(FileOpenFailRead)
diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument-result.txt b/Tests/RunCMake/file/UPLOAD-unused-argument-result.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-unused-argument-result.txt
diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt b/Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt
new file mode 100644
index 0000000..3c1b744
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-unused-argument-stderr.txt
@@ -0,0 +1,5 @@
+^CMake Warning \(dev\) at UPLOAD-unused-argument.cmake:[0-9]+ \(file\):
+ Unexpected argument: JUNK
+Call Stack \(most recent call first\):
+ CMakeLists.txt:[0-9]+ \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.$
diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument.cmake b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake
new file mode 100644
index 0000000..94ac9ac
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-unused-argument.cmake
@@ -0,0 +1,5 @@
+file(UPLOAD
+ "${CMAKE_CURRENT_SOURCE_DIR}/UPLOAD-unused-argument.txt"
+ "file://${CMAKE_CURRENT_BINARY_DIR}/unused-argument.txt"
+ JUNK
+ )
diff --git a/Tests/RunCMake/file/UPLOAD-unused-argument.txt b/Tests/RunCMake/file/UPLOAD-unused-argument.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/file/UPLOAD-unused-argument.txt
diff --git a/Utilities/KWIML/Copyright.txt b/Utilities/KWIML/Copyright.txt
index a6204b0..515c4eb 100644
--- a/Utilities/KWIML/Copyright.txt
+++ b/Utilities/KWIML/Copyright.txt
@@ -1,5 +1,5 @@
Kitware Information Macro Library
-Copyright 2010-2015 Kitware, Inc.
+Copyright 2010-2016 Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/Utilities/KWIML/include/kwiml/abi.h b/Utilities/KWIML/include/kwiml/abi.h
index 3626361..5ffd542 100644
--- a/Utilities/KWIML/include/kwiml/abi.h
+++ b/Utilities/KWIML/include/kwiml/abi.h
@@ -1,6 +1,6 @@
/*============================================================================
Kitware Information Macro Library
- Copyright 2010-2015 Kitware, Inc.
+ Copyright 2010-2016 Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -467,6 +467,10 @@ suppression macro KWIML_ABI_NO_VERIFY was defined.
#elif defined(__XTENSA_EL__)
# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE
+/* RISC-V */
+#elif defined(__riscv__)
+# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE
+
/* Unknown CPU */
#elif !defined(KWIML_ABI_NO_ERROR_ENDIAN)
# error "Byte order of target CPU unknown."
diff --git a/Utilities/KWIML/include/kwiml/int.h b/Utilities/KWIML/include/kwiml/int.h
index b297ace..489c603 100644
--- a/Utilities/KWIML/include/kwiml/int.h
+++ b/Utilities/KWIML/include/kwiml/int.h
@@ -1,6 +1,6 @@
/*============================================================================
Kitware Information Macro Library
- Copyright 2010-2015 Kitware, Inc.
+ Copyright 2010-2016 Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/Utilities/KWIML/src/version.h.in b/Utilities/KWIML/src/version.h.in
index e58e0dc..0ac8854 100644
--- a/Utilities/KWIML/src/version.h.in
+++ b/Utilities/KWIML/src/version.h.in
@@ -1,6 +1,6 @@
/*============================================================================
Kitware Information Macro Library
- Copyright 2010-2015 Kitware, Inc.
+ Copyright 2010-2016 Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/Utilities/Release/Cygwin/CMakeLists.txt b/Utilities/Release/Cygwin/CMakeLists.txt
deleted file mode 100644
index 73a8220..0000000
--- a/Utilities/Release/Cygwin/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-file(GLOB INSTALLED_CURSES /usr/bin/cygncurses-*.dll)
-set(MAX 0)
-foreach(f ${INSTALLED_CURSES})
- if(NOT "${f}" MATCHES "\\+")
- string(REGEX REPLACE ".*-([0-9]*).dll" "\\1" NUMBER "${f}")
- if(NUMBER GREATER MAX)
- set(MAX ${NUMBER})
- endif()
- endif()
-endforeach()
-string(REGEX REPLACE "/usr/bin/" "\\1" NUMBER "${f}")
-set(CMAKE_NCURSES_VERSION "libncurses${MAX}")
-message(STATUS "Using curses version: libncurses${MAX}")
-configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-setup.hint.in"
- "${CMake_BINARY_DIR}/setup.hint")
-configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/README.cygwin.in"
- "${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README")
-install_files(/share/doc/Cygwin FILES
- ${CMake_BINARY_DIR}/Docs/${CPACK_PACKAGE_FILE_NAME}-${CPACK_CYGWIN_PATCH_NUMBER}.README
- )
-configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-package.sh.in"
- ${CPACK_CYGWIN_BUILD_SCRIPT})
-configure_file("${CMake_SOURCE_DIR}/Utilities/Release/Cygwin/cygwin-patch.diff.in"
- ${CPACK_CYGWIN_PATCH_FILE})
-
diff --git a/Utilities/Release/Cygwin/README.cygwin.in b/Utilities/Release/Cygwin/README.cygwin.in
deleted file mode 100644
index 17cf2a1..0000000
--- a/Utilities/Release/Cygwin/README.cygwin.in
+++ /dev/null
@@ -1,42 +0,0 @@
-cmake
---------------------------------------
-Runtime requirements:
- cygwin-1.5.21(0.156/4/2) or newer
-
-Build requirements
- cygwin-1.5.21(0.156/4/2) or newer
- make
-
-Canonical homepage:
- https://cmake.org
-
-Canonical download:
- ftp://www.cmake.org/pub/cmake/
-
-------------------------------------
-
-Build instructions:
- unpack @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2
- if you use setup to install this src package, it will be
- unpacked under /usr/src automatically
- cd /usr/src
- ./@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh all
-
-This will create:
- /usr/src/@CPACK_PACKAGE_FILE_NAME@.tar.bz2
- /usr/src/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2
-
--------------------------------------------
-
-Port Notes:
-
-The directory /usr/share/@CPACK_PACKAGE_FILE_NAME@/include is purposely not
-located at /usr/include/@CPACK_PACKAGE_FILE_NAME@ or /usr/include/cmake. The
-files it contains are not meant for inclusion in any C or C++ program.
-They are used for compiling dynamically loadable CMake commands inside
-projects that provide them. CMake will automatically provide the
-proper include path when the files are needed.
-
-------------------
-
-Cygwin port maintained by: CMake Developers <cmake@www.cmake.org>
diff --git a/Utilities/Release/Cygwin/cygwin-package.sh.in b/Utilities/Release/Cygwin/cygwin-package.sh.in
deleted file mode 100755
index dff27f1..0000000
--- a/Utilities/Release/Cygwin/cygwin-package.sh.in
+++ /dev/null
@@ -1,90 +0,0 @@
-TOP_DIR=`cd \`echo "$0" | sed -n '/\//{s/\/[^\/]*$//;p;}'\`;pwd`
-
-# create build directory
-mkdirs()
-{
- (
- mkdir -p "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build"
- )
-}
-
-# cd into
-# untar source tree and apply patch
-prep()
-{
- (
- cd "$TOP_DIR" &&
- tar xvfj @CPACK_PACKAGE_FILE_NAME@.tar.bz2
- patch -p0 < "@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch" &&
- mkdirs
- )
-}
-
-conf()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- ../bootstrap --parallel=2
- )
-}
-
-build()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- make -j2 &&
- make test
- )
-}
-
-clean()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- make clean
- )
-}
-
-pkg()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- ./bin/cpack &&
- mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.tar.bz2 "$TOP_DIR"
- )
-}
-
-spkg()
-{
- (
- cd "$TOP_DIR/@CPACK_PACKAGE_FILE_NAME@/.build" &&
- ./bin/cpack --config CPackSourceConfig.cmake &&
- mv @CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@-src.tar.bz2 "$TOP_DIR"
- )
-}
-
-finish()
-{
- (
- rm -rf "@CPACK_PACKAGE_FILE_NAME@"
- )
-}
-
-case $1 in
- prep) prep ; STATUS=$? ;;
- mkdirs) mkdirs ; STATUS=$? ;;
- conf) conf ; STATUS=$? ;;
- build) build ; STATUS=$? ;;
- clean) clean ; STATUS=$? ;;
- package) pkg ; STATUS=$? ;;
- pkg) pkg ; STATUS=$? ;;
- src-package) spkg ; STATUS=$? ;;
- spkg) spkg ; STATUS=$? ;;
- finish) finish ; STATUS=$? ;;
- all) (
- prep && conf && build && pkg && spkg && finish ;
- STATUS=$?
- ) ;;
- *) echo "Error: bad argument (all or one of these: prep mkdirs conf build clean package pkg src-package spkg finish)" ; exit 1 ;;
-esac
-exit ${STATUS}
diff --git a/Utilities/Release/Cygwin/cygwin-setup.hint.in b/Utilities/Release/Cygwin/cygwin-setup.hint.in
deleted file mode 100644
index a2532fc..0000000
--- a/Utilities/Release/Cygwin/cygwin-setup.hint.in
+++ /dev/null
@@ -1,5 +0,0 @@
-# CMake setup.hint file for cygwin setup.exe program
-category: Devel
-requires: libgcc1 libidn11 @CMAKE_NCURSES_VERSION@ libstdc++6
-sdesc: "A cross platform build manager"
-ldesc: "CMake is a cross platform build manager. It allows you to specify build parameters for C and C++ programs in a cross platform manner. For cygwin Makefiles will be generated. CMake is also capable of generating microsoft project files, nmake, and borland makefiles. CMake can also perform system inspection operations like finding installed libraries and header files."
diff --git a/Utilities/Release/README b/Utilities/Release/README
index 12eafe1..ed1d52e 100644
--- a/Utilities/Release/README
+++ b/Utilities/Release/README
@@ -15,7 +15,4 @@ Then as kitware@hythloth, using an up-to-date CMake:
create-cmake-release.cmake: script to run to create release sh scripts
Add or remove machines in create-cmake-release.cmake.
-Cygwin -> directory that contains cpack cygwin package files used in
- CMakeCPack.cmake
-
machine_release.cmake : config files for each machine
diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake
index 192549e..7b144f1 100644
--- a/Utilities/Release/create-cmake-release.cmake
+++ b/Utilities/Release/create-cmake-release.cmake
@@ -12,7 +12,6 @@ set(RELEASE_SCRIPTS_BATCH_1
)
set(RELEASE_SCRIPTS_BATCH_2
- cygwin_release.cmake # Cygwin x86
win64_release.cmake # Windows x64
)
diff --git a/Utilities/Release/cygwin_release.cmake b/Utilities/Release/cygwin_release.cmake
deleted file mode 100644
index ca3e794..0000000
--- a/Utilities/Release/cygwin_release.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseCygwin")
-set(PROCESSORS 9)
-set(BOOTSTRAP_ARGS "")
-set(MAKE_PROGRAM "make")
-set(MAKE "${MAKE_PROGRAM} -j8")
-set(HOST dash2win64)
-set(CPACK_BINARY_GENERATORS "CygwinBinary")
-set(CPACK_SOURCE_GENERATORS "CygwinSource")
-set(MAKE_PROGRAM "make")
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
-CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE
-CTEST_TEST_TIMEOUT:STRING=7200
-DART_TESTING_TIMEOUT:STRING=7200
-SPHINX_HTML:BOOL=ON
-SPHINX_MAN:BOOL=ON
-CMake_INSTALL_DEPENDENCIES:BOOL=ON
-")
-set(CXX g++)
-set(CC gcc)
-set(GIT_EXTRA "git config core.autocrlf false")
-get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-# WARNING: Temporary fix!! This exclusion of the ExternalProject test
-# is temporary until we can set up a new cygwin build machine.
-# It only fails because of cygwin/non-cygwin "svn" mismatches in this
-# particular environment. This is less than ideal, but at least it
-# allows us to produce cygwin builds in the short term.
-set(EXTRA_CTEST_ARGS "-E ExternalProject")
-
-set(LOCAL_DIR cygwin)
-
-include(${path}/release_cmake.cmake)
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index 0d9c784..0db89b5 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -108,10 +108,6 @@ foreach(gen ${generators})
if("${gen}" STREQUAL "TBZ2")
set(SUFFIXES ${SUFFIXES} "*.tar.bz2")
endif()
- if("${gen}" MATCHES "Cygwin")
- set(SUFFIXES ${SUFFIXES} "*.tar.bz2")
- set(extra_files setup.hint)
- endif()
if("${gen}" STREQUAL "TZ")
set(SUFFIXES ${SUFFIXES} "*.tar.Z")
endif()
diff --git a/Utilities/Scripts/update-kwiml.bash b/Utilities/Scripts/update-kwiml.bash
index 5c0d192..4497c92 100755
--- a/Utilities/Scripts/update-kwiml.bash
+++ b/Utilities/Scripts/update-kwiml.bash
@@ -7,7 +7,7 @@ shopt -s dotglob
readonly name="KWIML"
readonly ownership="KWIML Upstream <kwrobot@kitware.com>"
readonly subtree="Utilities/KWIML"
-readonly repo="https://github.com/Kitware/KWIML.git"
+readonly repo="https://gitlab.kitware.com/utils/kwiml.git"
readonly tag="master"
readonly shortlog=true
readonly paths="
diff --git a/Utilities/cmlibuv/CMakeLists.txt b/Utilities/cmlibuv/CMakeLists.txt
index e25ac82..1b384b5 100644
--- a/Utilities/cmlibuv/CMakeLists.txt
+++ b/Utilities/cmlibuv/CMakeLists.txt
@@ -168,6 +168,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ list(APPEND uv_libraries
+ kvm
+ )
list(APPEND uv_headers
include/uv-bsd.h
)
@@ -178,6 +181,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
+ list(APPEND uv_libraries
+ kvm
+ )
list(APPEND uv_headers
include/uv-bsd.h
)
@@ -188,6 +194,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
+ list(APPEND uv_libraries
+ kvm
+ )
list(APPEND uv_headers
include/uv-bsd.h
)