On 09/24/2013 05:28 PM, Daniele E. Domenichelli wrote: > You mean something like this? > > if("${ARGN}" STREQUAL "") > set(_lang C) > elseif("${ARGN}" MATCHES "^LANGUAGE;([a-zA-Z]+)$") > set(_lang "${CMAKE_MATCH_1}") > else() > message(FATAL_ERROR "Unknown arguments:\n ${ARGN}\n") > endif()
That should work, though I suggest using the 'x' trick: if("x${ARGN}" STREQUAL "x") set(_lang C) elseif("x${ARGN}" MATCHES "^xLANGUAGE;([a-zA-Z]+)$") to avoid possible collision of ${ARGN} with other if tests. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers