Commit Graph

28 Commits

Author SHA1 Message Date
Roland Kaufmann
b6cdc06b7a Don't search system directories when path given
If the user has given a path to the module, then the system paths should
not be searched, as these may contain an old and outdated version. We
don't necessarily want that just because there was a problem with our
own installation!
2013-03-20 09:33:35 +01:00
Roland Kaufmann
ce16450e43 Bugfix change from function to macro
This change is similar to commit 89be4e14: After find_package_append_to
changed from function to macro to pick up the configuration not only
from the module itself but also from everything it pulled it, the
variable MODULE is overwritten (variable module in lower case is a
parameter, so it is replaced in the source body). Thus, the test in the
end is not whether *this* module was found, but if its last dependency
was! This made the build crash only in some projects but not in others.
2013-03-18 10:32:53 +01:00
Roland Kaufmann
040b7adb4e Search for libraries in dunecontrol's default build dir 2013-03-17 21:03:19 +01:00
Roland Kaufmann
4d7752b980 Don't search for source in build directories 2013-03-17 21:03:09 +01:00
Roland Kaufmann
9c1da9f5bf Bugfix don't search for module twice! 2013-03-15 13:48:43 +01:00
Roland Kaufmann
bafa781181 Search in dunecontrol build directories for other modules 2013-03-15 12:44:24 +01:00
Roland Kaufmann
f42bf41e15 Use our own find routine recursively
Don't use bare find_package in OpmPackage when we have already written
OpmFind to take out the worst warts.
2013-03-15 10:57:53 +01:00
Roland Kaufmann
3d252ae8f4 Allow variables from indirect dependencies to bubble up
The previous implementation was a function, which although OK from an
implementation standpoint -- the local variables doesn't pollute the
global namespace -- would not allow variables that were set in indirect
dependencies to bubble up to the main module. This is a problem for
modules which are dependent on configuration variables to be present.
2013-03-15 10:45:05 +01:00
Roland Kaufmann
ccbcb6f364 Enable debug tracing when finding modules 2013-03-15 01:24:06 +01:00
Roland Kaufmann
ac861580d7 Don't search in architecture-irrelevant directories
If we are on a 64-bits machine, there is no point in searching lib32
and conversely. Quite the opposite, it can only end badly if a library
is actually found in the wrong architecture directory.
2013-03-13 10:38:27 +01:00
Roland Kaufmann
11bf7bf34e Propagate information about whether module was found quietly 2013-03-05 13:58:19 +01:00
Roland Kaufmann
911bf9593f Do not duplicate handling of duplicate libraries
There were (at least) three implementations of the same macro; these
have been collected into a separate helper module. (Note that this
means that FindERT is now not completely stand-alone anymore).
2013-03-05 13:50:58 +01:00
Atgeirr Flø Rasmussen
0ac31dd871 Merge pull request #166 from rolk/166_upcase
Use uppercase consistently in configuration variable names
2013-03-05 00:49:33 -08:00
Roland Kaufmann
3febb086dc Check that test prog. compiled before declared found
The previous version did the test and setting of the config variable
right, but reported that the module was found only if the files were
located, independently of the result of the compile.
2013-03-04 23:41:41 +01:00
Roland Kaufmann
3c5a73e9c4 Reuse the uppercase variant across the entire function 2013-03-04 23:33:30 +01:00
Roland Kaufmann
76786442ce Allow uppercase variant of package root also
Both the straight-forward mod-ule_ROOT variable and the more idiomatic
MOD_ULE_ROOT variant are allowed when specifying where to look for a
package.
2013-03-04 21:25:18 +01:00
Roland Kaufmann
a35e0d23e3 Probe with include dirs to ALL dependencies
It may be that the header in the test is dependent on some other header
in one of the dependencies.
2013-03-04 09:46:33 +01:00
Roland Kaufmann
7ef129d708 Allow optional packages in find-module package list 2013-03-04 09:46:33 +01:00
Roland Kaufmann
d9980beef1 Guess where libraries are using full path
Because the probe is run from the project source tree(!)
2013-03-04 09:46:32 +01:00
Roland Kaufmann
0db4d63bb0 Provide all config vars to test probes systematically
Generate a list of compiler options that does the defines in the same
manner that it would for config.h
2013-02-20 23:49:04 +01:00
Roland Kaufmann
5aa7def08d Search in sibling directories if no other version found
Thus, if you checkout projects in a common directory, they will find
eachother.
2013-02-11 22:38:02 +01:00
Roland Kaufmann
61cdf5c1d6 Search for libraries on multi-arch distributions 2013-02-11 22:38:02 +01:00
Roland Kaufmann
107019d22b Only clean up config variables if there actually is any 2013-02-11 22:37:59 +01:00
Roland Kaufmann
7227bbf801 Better error messages on missing items
The old version only said that _req_vars was not found; now you get to
see the actual variables that are missing.
2013-02-11 22:37:59 +01:00
Roland Kaufmann
23c98fd592 Allow package dir. to be specified with _ROOT suffix
If one sets the variable foo_DIR it will cause CMake to look for a
configuration file in that directory. In case we want to set the root
directory to an installation which doesn't have a config-mode CMake
module, and use the find module provided by ourself, we need a separate
variable that can hold the location of this directory and the most
common suffix for this seems to be _ROOT (an alternative is _PREFIX)
2013-02-11 22:37:56 +01:00
Roland Kaufmann
10d033698d Get linker flags from pkg-config if specified 2013-02-11 22:37:54 +01:00
Roland Kaufmann
3045092436 Specify dependencies as one list, including args
Allow arguments to be used on the list of dependencies, this facilitates
searching for things like e.g. Boost, and there is now only need for one
list since REQUIRED can be one of the arguments.
2013-02-11 22:37:54 +01:00
Roland Kaufmann
0deeef0127 Rename macro modules
Modules that starts with the prefix "Use" alters the build to enable
something by default, whereas modules that only provide functionality
is not common to start with that prefix.
2013-02-11 22:37:53 +01:00