~latexila/ubuntu/precise/latexila/2.4.0

« back to all changes in this revision

Viewing changes to cmake/vala/ParseArguments.cmake

  • Committer: Daniel Holbach
  • Date: 2011-09-12 09:59:44 UTC
  • mfrom: (9.1.1 latexila)
  • Revision ID: daniel.holbach@canonical.com-20110912095944-cxapqlmwz1g9zp6b
Tags: 2.2.0-0ubuntu1
* New upstream release. (LP: #837392)
* Upstream ChangeLog:
 - Integration with GNOME Damned Lies (use ITS Tool, ...)
 - Structure: more robust, and more optimized
 - Latexmk post processor: extract Latexmk messages
 - BibTeX and MakeIndex: fix problems for writing *.blg or *.ind files
 - Some UI improvements
 - New CMake options: WITH_GNOME and COMPILE_SCHEMA
 - Open File: filter to show only .tex and .bib files
 - Translation updates: French, German and Spanish
 - Some other little improvements and bug fixes
* debian/control: Build-Depends:
 - valac is no longer needed (valac 0.12.x is not available on Oneiric).
 - itstool is now needed.
* debian/rules:
 - Removed -DBUILD_VALA=ON CMake flag: we can't translate Vala
    files with Vala 0.13.
 - Added -DWITH_GNOME=ON: Better integration with GNOME
    and gsettings-desktop-schemas.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
##
2
 
# This is a helper Macro to parse optional arguments in Macros/Functions
3
 
# It has been taken from the public CMake wiki.  
4
 
# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and
5
 
# licensing.
6
 
##
7
 
macro(parse_arguments prefix arg_names option_names)
8
 
  set(DEFAULT_ARGS)
9
 
  foreach(arg_name ${arg_names})
10
 
    set(${prefix}_${arg_name})
11
 
  endforeach(arg_name)
12
 
  foreach(option ${option_names})
13
 
    set(${prefix}_${option} FALSE)
14
 
  endforeach(option)
15
 
 
16
 
  set(current_arg_name DEFAULT_ARGS)
17
 
  set(current_arg_list)
18
 
  foreach(arg ${ARGN})
19
 
    set(larg_names ${arg_names})
20
 
    list(FIND larg_names "${arg}" is_arg_name)
21
 
    if(is_arg_name GREATER -1)
22
 
      set(${prefix}_${current_arg_name} ${current_arg_list})
23
 
      set(current_arg_name ${arg})
24
 
      set(current_arg_list)
25
 
    else(is_arg_name GREATER -1)
26
 
      set(loption_names ${option_names})
27
 
      list(FIND loption_names "${arg}" is_option)
28
 
      if(is_option GREATER -1)
29
 
            set(${prefix}_${arg} TRUE)
30
 
      else(is_option GREATER -1)
31
 
            set(current_arg_list ${current_arg_list} ${arg})
32
 
      endif(is_option GREATER -1)
33
 
    endif(is_arg_name GREATER -1)
34
 
  endforeach(arg)
35
 
  set(${prefix}_${current_arg_name} ${current_arg_list})
36
 
endmacro(parse_arguments)