From: <ai...@us...> - 2009-08-03 02:27:27
|
Revision: 10201 http://plplot.svn.sourceforge.net/plplot/?rev=10201&view=rev Author: airwin Date: 2009-08-03 02:27:19 +0000 (Mon, 03 Aug 2009) Log Message: ----------- Drop ENABLE_cxx logic or replace it by CMAKE_CXX_COMPILER_WORKS logic where appropriate. The result should be that cmake always tries to find a working C++ compiler for a fresh build and continues to do that for subsequent "dirty" builds if a working C++ compiler was not found previously. This logic sets ENABLE_cxx OFF when there is no working C++ compiler, but the logic does not depend on ENABLE_cxx. Thus, that variable is strictly reserved for toggling whether or not C++ bindings are to be built/installed and whether C++ examples are built (for BUILD_TEST=ON) and installed. Modified Paths: -------------- trunk/cmake/modules/c++.cmake Modified: trunk/cmake/modules/c++.cmake =================================================================== --- trunk/cmake/modules/c++.cmake 2009-08-03 02:21:05 UTC (rev 10200) +++ trunk/cmake/modules/c++.cmake 2009-08-03 02:27:19 UTC (rev 10201) @@ -28,15 +28,15 @@ OPTION(ENABLE_cxx "Enable C++ bindings" ON) endif(DEFAULT_NO_BINDINGS) -if(ENABLE_cxx AND NOT PLPLOT_CXX_COMPILER_WORKS) +if(NOT PLPLOT_CXX_COMPILER_WORKS) workaround_9220(CXX PLPLOT_CXX_COMPILER_WORKS) if(NOT PLPLOT_CXX_COMPILER_WORKS) message(STATUS "WARNING: no working C++ compiler so disabling C++ bindings and examples.") set(ENABLE_cxx OFF CACHE BOOL "Enable C++ bindings" FORCE) endif(NOT PLPLOT_CXX_COMPILER_WORKS) -endif(ENABLE_cxx AND NOT PLPLOT_CXX_COMPILER_WORKS) +endif(NOT PLPLOT_CXX_COMPILER_WORKS) -if(ENABLE_cxx) +if(PLPLOT_CXX_COMPILER_WORKS) # Find and check C++ compiler. enable_language(CXX OPTIONAL) @@ -44,9 +44,9 @@ message(STATUS "No working C++ compiler found so disabling C++ bindings and examples.") set(ENABLE_cxx OFF CACHE BOOL "Enable C++ bindings" FORCE) endif(NOT CMAKE_CXX_COMPILER_WORKS) -endif(ENABLE_cxx) +endif(PLPLOT_CXX_COMPILER_WORKS) -if(ENABLE_cxx) +if(CMAKE_CXX_COMPILER_WORKS) # Check if "using namespace std;" works INCLUDE(TestForNamespace) @@ -62,4 +62,4 @@ # Need to add check if stdint.h can be used from c++ (PL_HAVE_CXX_STDINT_H) INCLUDE(TestForStdintCXX) -endif(ENABLE_cxx) +endif(CMAKE_CXX_COMPILER_WORKS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |