Closed rpavlik closed 9 years ago
Wouldn't it be simpler to check CXXFEATURES_FOUND
(maybe in combination with the QUIET
argument to find_package
) be better than using EXISTS
? Also, we don't seem to use any features of this module except the compiler flags -- why do we not simply use check_cxx_compiler_flag
and check if -std=c++11
or alternatively -std=c++0x
is supported (like CXXFeatures does internally)?
EXISTS checks to see if the submodule is even there before trying to include the file - this avoids an error if it's not.
Also, I opted to use this since it's separately maintained and appears to be on-track to become a part of CMake itself.
On Mon, Aug 26, 2013 at 11:21 AM, Christian notifications@github.comwrote:
Wouldn't it be simpler to check CXXFEATURES_FOUND (maybe in combination with the QUIET argument to find_package) be better than using EXISTS? Also, we don't seem to use any features of this module except the compiler flags -- why do we not simply use check_cxx_compiler_flag and check if -std=c++11 or alternatively -std=c++0x is supported (like CXXFeatures does internally)?
— Reply to this email directly or view it on GitHubhttps://github.com/Oberon00/luabind/pull/19#issuecomment-23275292 .
Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University
rpavlik@iastate.edu http://academic.cleardefinition.com
Failing to find a package is not a fatal error, unless REQUIRED
is specified, only a warning is printed (unless QUIET
is specified). The documentation of find_package
says:
<package>_FOUND
will be set to indicate whether the package was found. [...] TheQUIET
option disables messages if the package cannot be found. [...] TheREQUIRED
option stops processing with an error message if the package cannot be found.
Yes, I know, but failing to find the module to find a package will give that confusing message that the original reporter posted about.
On Mon, Aug 26, 2013 at 11:33 AM, Christian notifications@github.comwrote:
Failing to find a package is not a fatal error, unless REQUIRED is specified, only a warning is printed (unless QUIET is specified). The documentation of find_packagehttp://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:find_packagesays:
_FOUND will be set to indicate whether the package was found. [...] The QUIET option disables messages if the package cannot be found. [...] The REQUIRED option stops processing with an error message if the package cannot be found. — Reply to this email directly or view it on GitHubhttps://github.com/Oberon00/luabind/pull/19#issuecomment-23276150 .
Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University
rpavlik@iastate.edu http://academic.cleardefinition.com
failing to find the module to find a package will give that confusing message
I have to insist: :wink:
The
QUIET
option disables messages if the package cannot be found.
Mostly handling the case that someone didn't do
git clone --recursive
more elegantly.