From: <ai...@us...> - 2009-07-16 18:44:00
|
Revision: 10153 http://plplot.svn.sourceforge.net/plplot/?rev=10153&view=rev Author: airwin Date: 2009-07-16 18:43:59 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Remove attempted workaround for CMake enable_language OPTIONAL signature bug which is described at http://public.kitware.com/Bug/view.php?id=9220. Since that OPTIONAL signature was not working, the idea of the workaround was to pre-search for the compiler by using "include(CMakeDetermine<language>Compiler)". If this check revealed the compiler was missing, we could then avoid the call to enable_language (which incorrectly errors out rather than warns when a compiler is missing). However, it turns out this workaround causes cache issues (undefined language-related variables) if the ccmake CLI or cmake-gui GUI are used rather than the cmake application for configuring PLplot. Thus, drop the workaround and accept the hard landing (CMake error) instead. This hard landing will occur whenever a user fails to disable a language (Ada, C++, D, Fortran, or Java) when the corresponding language development environment (compiler and associated libraries) is not installed on his computer. The fundamental solution to this issue is to get the CMake developers to address bug 9220 so the OPTIONAL signature of enable_language actually avoids erroring out when the language development environment is missing/broken. But this will take some time. Modified Paths: -------------- trunk/cmake/modules/ada.cmake trunk/cmake/modules/c++.cmake trunk/cmake/modules/d.cmake trunk/cmake/modules/fortran.cmake trunk/cmake/modules/java.cmake Modified: trunk/cmake/modules/ada.cmake =================================================================== --- trunk/cmake/modules/ada.cmake 2009-07-16 17:21:51 UTC (rev 10152) +++ trunk/cmake/modules/ada.cmake 2009-07-16 18:43:59 UTC (rev 10153) @@ -25,17 +25,7 @@ option(ENABLE_ada "Enable Ada bindings" ON) endif(DEFAULT_NO_BINDINGS) -# OPTIONAL below currently does not work properly with CMake so attempt -# to deal with a possibly missing compiler first as a workaround. if(ENABLE_ada) - include(CMakeDetermineAdaCompiler) - if(NOT CMAKE_Ada_COMPILER) - message(STATUS "WARNING: Ada compiler not found so disabling Ada bindings and examples.") - set(ENABLE_ada OFF CACHE BOOL "Enable Ada bindings" FORCE) - endif(NOT CMAKE_Ada_COMPILER) -endif(ENABLE_ada) - -if(ENABLE_ada) # Find and check Ada compiler enable_language(Ada OPTIONAL) if(NOT CMAKE_Ada_COMPILER_WORKS) Modified: trunk/cmake/modules/c++.cmake =================================================================== --- trunk/cmake/modules/c++.cmake 2009-07-16 17:21:51 UTC (rev 10152) +++ trunk/cmake/modules/c++.cmake 2009-07-16 18:43:59 UTC (rev 10153) @@ -28,17 +28,7 @@ OPTION(ENABLE_cxx "Enable C++ bindings" ON) endif(DEFAULT_NO_BINDINGS) -# OPTIONAL below currently does not work properly with CMake so attempt -# to deal with a possibly missing compiler first as a workaround. if(ENABLE_cxx) - include(CMakeDetermineCXXCompiler) - if(NOT CMAKE_CXX_COMPILER) - message(STATUS "WARNING: C++ compiler not found so disabling C++ bindings and examples.") - set(ENABLE_cxx OFF CACHE BOOL "Enable C++ bindings" FORCE) - endif(NOT CMAKE_CXX_COMPILER) -endif(ENABLE_cxx) - -if(ENABLE_cxx) # Find and check C++ compiler. enable_language(CXX OPTIONAL) Modified: trunk/cmake/modules/d.cmake =================================================================== --- trunk/cmake/modules/d.cmake 2009-07-16 17:21:51 UTC (rev 10152) +++ trunk/cmake/modules/d.cmake 2009-07-16 18:43:59 UTC (rev 10153) @@ -28,17 +28,7 @@ option(ENABLE_d "Enable D bindings" OFF) endif(DEFAULT_NO_BINDINGS) -# OPTIONAL below currently does not work properly with CMake so attempt -# to deal with a possibly missing compiler first as a workaround. if(ENABLE_d) - include(CMakeDetermineDCompiler) - if(NOT CMAKE_D_COMPILER) - message(STATUS "WARNING: D compiler not found so disabling D bindings and examples.") - set(ENABLE_d OFF CACHE BOOL "Enable D bindings" FORCE) - endif(NOT CMAKE_D_COMPILER) -endif(ENABLE_d) - -if(ENABLE_d) # Find and check D compiler enable_language(D OPTIONAL) if(NOT CMAKE_D_COMPILER_WORKS) Modified: trunk/cmake/modules/fortran.cmake =================================================================== --- trunk/cmake/modules/fortran.cmake 2009-07-16 17:21:51 UTC (rev 10152) +++ trunk/cmake/modules/fortran.cmake 2009-07-16 18:43:59 UTC (rev 10153) @@ -30,18 +30,7 @@ option(ENABLE_f95 "Enable f95 bindings" ON) endif(DEFAULT_NO_BINDINGS) -# OPTIONAL below currently does not work properly with CMake so attempt -# to deal with a possibly missing compiler first as a workaround. if(ENABLE_f77 OR ENABLE_f95) - include(CMakeDetermineFortranCompiler) - if(NOT CMAKE_Fortran_COMPILER) - message(STATUS "WARNING: Fortran compiler not found so disabling Fortran bindings and examples.") - set(ENABLE_f77 OFF CACHE BOOL "Enable f77 bindings" FORCE) - set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE) - endif(NOT CMAKE_Fortran_COMPILER) -endif(ENABLE_f77 OR ENABLE_f95) - -if(ENABLE_f77 OR ENABLE_f95) # Find and check Fortran compiler. enable_language(Fortran OPTIONAL) if(NOT CMAKE_Fortran_COMPILER_WORKS) Modified: trunk/cmake/modules/java.cmake =================================================================== --- trunk/cmake/modules/java.cmake 2009-07-16 17:21:51 UTC (rev 10152) +++ trunk/cmake/modules/java.cmake 2009-07-16 18:43:59 UTC (rev 10153) @@ -40,17 +40,7 @@ set(ENABLE_java OFF CACHE BOOL "Enable Java bindings" FORCE) endif(ENABLE_java AND NOT SWIG_FOUND) -# OPTIONAL below currently does not work properly with CMake so attempt -# to deal with a possibly missing compiler first as a workaround. if(ENABLE_java) - include(CMakeDetermineJavaCompiler) - if(NOT CMAKE_Java_COMPILER) - message(STATUS "WARNING: Java compiler not found so disabling Java bindings and examples.") - set(ENABLE_java OFF CACHE BOOL "Enable Java bindings" FORCE) - endif(NOT CMAKE_Java_COMPILER) -endif(ENABLE_java) - -if(ENABLE_java) # Find and check Java compiler. enable_language(Java OPTIONAL) if(NOT CMAKE_Java_COMPILER_WORKS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |