From: <ai...@us...> - 2010-03-07 00:43:22
|
Revision: 10858 http://plplot.svn.sourceforge.net/plplot/?rev=10858&view=rev Author: airwin Date: 2010-03-07 00:43:15 +0000 (Sun, 07 Mar 2010) Log Message: ----------- Introduce FORCE_OCAMLC option to force using ocamlc rather than ocamlopt (defaults to NO). Fix CMake logic bug for the case when OCAMLOPT is not true. Modified Paths: -------------- trunk/bindings/ocaml/plcairo/CMakeLists.txt trunk/cmake/modules/ocaml.cmake Modified: trunk/bindings/ocaml/plcairo/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/plcairo/CMakeLists.txt 2010-03-06 19:11:19 UTC (rev 10857) +++ trunk/bindings/ocaml/plcairo/CMakeLists.txt 2010-03-07 00:43:15 UTC (rev 10858) @@ -209,12 +209,14 @@ # file-dependency chains. Therefore, to avoid screwing up parallel # builds must serialize with target depends. add_dependencies(target_plcairo_cmi target_lib_plcairo_stubs) - # ocamlc + # ocamlc used regardless add_dependencies(target_plcairo_cmo target_plcairo_cmi) add_dependencies(target_plcairo_cma target_plcairo_cmo) - # ocamlopt - add_dependencies(target_plcairo_cmx target_plcairo_cmi) - add_dependencies(target_plcairo_cmxa target_plcairo_cmx) + # ocamlopt only used if OCAMLOPT is true. + if(OCAMLOPT) + add_dependencies(target_plcairo_cmx target_plcairo_cmi) + add_dependencies(target_plcairo_cmxa target_plcairo_cmx) + endif(OCAMLOPT) # Basic build done, now trying to finish up by adapting bits # and pieces of old build procedure below. Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2010-03-06 19:11:19 UTC (rev 10857) +++ trunk/cmake/modules/ocaml.cmake 2010-03-07 00:43:15 UTC (rev 10858) @@ -67,7 +67,11 @@ endif(ENABLE_ocaml) if(ENABLE_ocaml) - find_program(OCAMLOPT NAMES ocamlopt.opt ocamlopt) + option(FORCE_OCAMLC "Force use of ocamlc rather than ocamlopt?" OFF) + if(NOT FORCE_OCAMLC) + find_program(OCAMLOPT NAMES ocamlopt.opt ocamlopt) + endif(NOT FORCE_OCAMLC) + if (OCAMLOPT) message(STATUS "OCAMLOPT = ${OCAMLOPT}") else (OCAMLOPT) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |