Revert the feature added by commit v3.1.0-rc1~420^2~2 (FindOpenGL:
Provide imported targets for GL and GLU, 2014-05-31). Unfortunately it
does not work on Windows because the full path to each library file is
not actually known. The IMPORTED_LOCATION of an imported target must be
a full path, but OPENGL_gl_LIBRARY is just 'opengl32' on Windows because
the actual library file is in some implicit link directory that we may
know know.
More infrastructure will be needed in CMake to allow a name-only
imported library. Until that exists, we will not be able to provide
imported targets in FindOpenGL.
Since commit v3.1.0-rc1~821^2 (Windows: Use response files to specify
link libraries for GNU tools, 2014-03-04) we use a response file to pass
possibly long linker flag lists to the GNU linker on Windows. On MinGW,
this may cause gfortran to use a response file to pass some flags to its
own internal invocation. This is okay except when we are parsing
implicit link flags from the compiler ABI detection build. If gfortran
uses a response file in that case then we may miss extracting some of
the implicit link flags, such as -lgfortran. Fortunately, in the
compiler ABI detection case we do not actually link to anything so the
response file is empty. Work around this problem by simply not using a
response file when the list of flags it is used to pass is empty (or
just whitespace).
Reported-by: Bill Somerville <bill@classdesign.com>
In commit v3.1.0-rc1~640^2~5 (Clean up usage of if(... MATCHES regex)
followed string(REGEX REPLACE regex), 2014-04-06) we accidentally broke
logging of the implicit library detection. Restore use of the
intermediate 'lib' variable so that the log message is constructed
properly.
Reported-by: Bill Somerville <bill@classdesign.com>
In commit 079e8469ab (... OpenGL always needs X11 on Unix, 2002-09-05)
the FindOpenGL module was taught to search for X11 as a dependency of
the OpenGL library. This was done without a detailed explanation, and
the dependency should not be explicitly needed because OpenGL headers
should not expose applications to X11 APIs directly.
Unfortunately the only way to know if anything legitimately depends on
this behavior (perhaps in static library cases) is to simply remove it
and wait for issues to be reported. If so, then we can add some kind of
compatibility setting for this later. Add a release note to draw
attention to this change.
Reported-by: Dainius "GreatEmerald" Masiliūnas <pastas4@gmail.com>
Some applications only need the OpenSSL crypto library and want to avoid
linking against the SSL library. Set OPENSSL_CRYPTO_LIBRARY and
OPENSSL_SSL_LIBRARY in the code paths that do not need to find them
separately, and document them publicly. This allows applications to be
more specific when linking against OpenSSL.
8a75c7ef Help: Document the export limitation of INTERFACE_SOURCES.
e1348056 Export: Disallow export of targets with INTERFACE_SOURCES
bb5905bb cmTarget: Don't allow relative paths in INTERFACE_SOURCES
808c77e2 Merge branch 'revert-cached-regex-clear' into revert-cached-regex-clear-for-master
7d674b5f Revert "ClearMatches: Only clear matches which were actually set" (#15261)
Since commit v3.1.0-rc1~479^2~1 (Add an "installed file" property
scope, 2014-05-15) the get_property and set_property commands
support an 'INSTALL' scope. Add documentation for this scope.
This can be allowed in the next release, but it needs to have some
features present and tested such as
* Ensuring that relative paths do not appear in the generated property.
* Ensuring that paths to the source or build directories do not appear.
* Generating a check in the file for CMake 3.1 or later so that the
resulting property will be consumed.
* Ensuring that any referenced targets are part of an export set and
generating a check for them.
* INSTALL_INTERFACE and BUILD_INTERFACE content.
All of these checks are already done for INTERFACE_INCLUDE_DIRECTORIES,
but it is too late to add them for INTERFACE_SOURCES for CMake 3.1.
As the checks introduce some new error conditions, it is better to
disallow exporting fully for this case and introduce proper error
conditions later instead of policies.
Follow the pattern of checks that are made for INTERFACE_INCLUDE_DIRECTORIES.
Existence is already checked by cmSourceFile::GetFullPath. Add a check
to disallow relative paths in source directories. Otherwise code such as
target_sources(lib1 INTERFACE foo.cpp)
would fail if consumed by a target in a different directory.
Unlike the INTERFACE_INCLUDE_DIRECTORIES behavior, we don't care whether
the entry comes from an IMPORTED target or not. In the include directories
case, the directory for a non-imported target might not exist yet but
might be created. In the sources case, a file which does not yet
exist in the filesystem must be explicitly marked with the GENERATED
property.
Adjust existing tests and add a new test for the error.
Since commit v3.1.0-rc1~688^2~15 (cmTarget: Add a method to obtain list of
filenames for sources, 2014-03-17) we have code paths that lookup sources by
strings containing their own full path after normalization to the actual case
on disk. This fails in the case that a cmSourceFile has already been created
with a different case in the filename. The comparison of the directory works
because it is always normalized. Only the comparison of the file name fails.
Fix this by using a case-insensitive comparison of source file names on
platforms that do not have case-sensitive filesystems.