On Wed, Feb 11, 2015 at 09:44:26 -0500, Brad King wrote:
> We already guarantee that CMAKE_<LANG>_COMPILER is set, so we could indicate
> failure simply by having it not set.

Well, the problem is that that is valid in Ninja. It might be available,
but it isn't going to be useful.

> Also one would need to decide what determines whether an optional language
> is not available.  If a compiler is available but cannot compile binaries,
> should that be an error or tolerated as "not available"?  As a user I would
> expect setting FC=/path/to/gfortran in my environment before calling CMake
> to cause Fortran to be enabled if the project wants it or else an error.

I guess there are two different issues here. Some projects want Fortran
if available (or even to just see whether it is available) while Ninja
needs to error out on Fortran because it just can't get the build
correct. So, IMO, my patch should be completely orthogonal to the
OPTIONAL keyword logic; Ninja doesn't care whether you have Fortran or
not, it just can't build it for you.

> We already treat unknown extensions like .txt files in most cases, so
> this would have to be specific to languages that were OPTIONAL and failed
> to be enabled.

Hrm. Yeah, that could be tricky.

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to