User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

cmake_tips [2018/08/06 19:31] created
cmake_tips [2018/08/06 19:35] (current)
Line 1: Line 1:
 ====== Regular expression ====== ====== Regular expression ======
-Example of MATCH +Example of MATCH. CMake is a bit weird. The following example would match the file name without extension.
 +<code cmake>
 +string(REGEX MATCH "​(.+).c"​ match ${current_file})
 +if (NOT ${match} EQUALS ""​)
 +  set (current_target ${CMAKE_MATCH_1})
cmake_tips.txt · Last modified: 2018/08/06 19:35 by