Warning, /education/kalzium/src/CMakeOCamlInstructions.cmake is written in an unsupported language. File is not indexed.

0001 link_directories (${OCAMLC_DIR})
0002 
0003 macro(OCAML_MLI_TO_CMI _cmi _mli)
0004    add_custom_command(OUTPUT ${_cmi}
0005                       COMMAND ${OCAML_OCAMLC_EXECUTABLE} ARGS -o ${_cmi} -I ${LIBFACILE_INCLUDE_DIR} -c ${_mli}
0006                       DEPENDS ${_mli} ${ARGN}
0007                       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
0008    set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${_cmi})
0009 endmacro(OCAML_MLI_TO_CMI)
0010 
0011 macro(OCAML_ML_TO_CMX _cmx _ml)
0012    add_custom_command(OUTPUT ${_cmx}
0013                    COMMAND ${OCAML_OCAMLOPT_EXECUTABLE} ARGS -o ${_cmx} -I ${LIBFACILE_INCLUDE_DIR} -c ${_ml}
0014                    DEPENDS ${_ml} ${ARGN}
0015                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
0016    set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${_cmx})
0017 endmacro(OCAML_ML_TO_CMX)
0018 
0019 ocaml_mli_to_cmi(${CMAKE_CURRENT_BINARY_DIR}/chemset.cmi ${CMAKE_CURRENT_SOURCE_DIR}/solver/chemset.mli
0020                  ${CMAKE_CURRENT_SOURCE_DIR}/solver/calc.mli  )
0021 
0022 ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/chemset.ml
0023                 ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmi  )
0024 
0025 ocaml_mli_to_cmi(${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmi ${CMAKE_CURRENT_SOURCE_DIR}/solver/datastruct.mli
0026                  ${CMAKE_CURRENT_SOURCE_DIR}/solver/datastruct.mli ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmi)
0027 
0028 ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/datastruct.ml
0029                 ${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmi ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx  )
0030 
0031 
0032 ocaml_mli_to_cmi(${CMAKE_CURRENT_BINARY_DIR}/chem.cmi ${CMAKE_CURRENT_SOURCE_DIR}/solver/chem.mli
0033                  ${CMAKE_CURRENT_SOURCE_DIR}/solver/chem.mli ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmi ${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmi)
0034 
0035 ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/chem.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/chem.ml
0036                 ${CMAKE_CURRENT_BINARY_DIR}/chem.cmi ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx  )
0037 
0038 
0039 ocaml_mli_to_cmi(${CMAKE_CURRENT_BINARY_DIR}/parser.cmi ${CMAKE_CURRENT_SOURCE_DIR}/solver/parser.mli
0040                  ${CMAKE_CURRENT_SOURCE_DIR}/solver/parser.mli ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmi)
0041 
0042 ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/parser.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/parser.ml
0043                 ${CMAKE_CURRENT_BINARY_DIR}/parser.cmi ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx )
0044 
0045 ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/lexer.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/lexer.ml
0046                 ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx ${CMAKE_CURRENT_BINARY_DIR}/parser.cmx  )
0047 
0048 
0049 ocaml_mli_to_cmi(${CMAKE_CURRENT_BINARY_DIR}/calc.cmi ${CMAKE_CURRENT_SOURCE_DIR}/solver/calc.mli
0050                  ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmi ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx  ${CMAKE_CURRENT_SOURCE_DIR}/solver/calc.mli ${CMAKE_CURRENT_SOURCE_DIR}/solver/datastruct.mli ${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmx ${CMAKE_CURRENT_BINARY_DIR}/chem.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/chem.mli ${CMAKE_CURRENT_BINARY_DIR}/parser.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/parser.mli ${CMAKE_CURRENT_BINARY_DIR}/lexer.cmx)
0051 
0052 ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/calc.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/calc.ml
0053                 ${CMAKE_CURRENT_BINARY_DIR}/calc.cmi )
0054 
0055 ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/lexer.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/lexer.ml
0056                 ${CMAKE_CURRENT_SOURCE_DIR}/solver/parser.ml ${CMAKE_CURRENT_SOURCE_DIR}/solver/lexer.ml )
0057 
0058 # object files
0059 
0060 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/modwrap.o
0061                    COMMAND ${OCAML_OCAMLOPT_EXECUTABLE} -I ${LIBFACILE_INCLUDE_DIR} -c ${CMAKE_CURRENT_SOURCE_DIR}/solver/modwrap.c
0062                    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/solver/modwrap.c ${CMAKE_CURRENT_BINARY_DIR}/solver.o
0063                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
0064 set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/modwrap.o)
0065 
0066 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/solver.o
0067                    COMMAND ${OCAML_OCAMLOPT_EXECUTABLE} -output-obj -o ${CMAKE_CURRENT_BINARY_DIR}/solver.o ${LIBFACILE_INCLUDE_DIR}/facile.cmxa  ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx ${CMAKE_CURRENT_BINARY_DIR}/parser.cmx ${CMAKE_CURRENT_BINARY_DIR}/lexer.cmx ${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmx ${CMAKE_CURRENT_BINARY_DIR}/chem.cmx ${CMAKE_CURRENT_BINARY_DIR}/calc.cmx
0068                    DEPENDS ${LIBFACILE_INCLUDE_DIR}/facile.cmxa  ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx ${CMAKE_CURRENT_BINARY_DIR}/parser.cmx ${CMAKE_CURRENT_BINARY_DIR}/lexer.cmx ${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmx ${CMAKE_CURRENT_BINARY_DIR}/chem.cmx ${CMAKE_CURRENT_BINARY_DIR}/calc.cmx
0069                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
0070 set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/solver.o)
0071 
0072 
0073 
0074 if(KDE4_BUILD_TESTS)
0075    ocaml_ml_to_cmx(${CMAKE_CURRENT_BINARY_DIR}/main.cmx ${CMAKE_CURRENT_SOURCE_DIR}/solver/main.ml
0076                    ${CMAKE_CURRENT_SOURCE_DIR}/solver/main.ml  )
0077         
0078    set(atestprog.opt_SRCS ${CMAKE_CURRENT_BINARY_DIR}/main.cmx ${CMAKE_CURRENT_BINARY_DIR}/chemset.cmx ${CMAKE_CURRENT_BINARY_DIR}/parser.cmx ${CMAKE_CURRENT_BINARY_DIR}/lexer.cmx ${CMAKE_CURRENT_BINARY_DIR}/datastruct.cmx ${CMAKE_CURRENT_BINARY_DIR}/chem.cmx ${CMAKE_CURRENT_BINARY_DIR}/calc.cmx  )
0079 
0080    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/solver/atestprog.opt
0081                    COMMAND ${OCAML_OCAMLOPT_EXECUTABLE}  ARGS -o ${atestprog.opt_SRCS}
0082                    DEPENDS ${atestprog.opt_SRCS}
0083                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
0084   set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/solver/atestprog.opt)
0085 
0086            #install( PROGRAMS atestprog.opt DESTINATION  ${BIN_INSTALL_DIR} )
0087 endif(KDE4_BUILD_TESTS)