如何在CMake中按名称建立目标?

时间:2019-03-29 13:15:50

标签: c cmake

我有一个由多个目标组成的cmake项目。

UPDATE Oficina_bancaria
SET   Cuentas = COALESCE( Cuentas, Corrientes_array() )
                MULTISET UNION
                Corrientes_array(
                  ( SELECT TREAT( REF(c) AS REF Corriente_udt )
                    FROM   Cuenta c
                    WHERE  c.IBAN = '1654ES6639071895270420369756' )
                )
WHERE  Codigo    = 6356
AND    Direccion = 'Cuesta Hector Montes 15 Puerta 5  Cuenca, 02539'

我只想构建target1并将其放入项目内的/ build文件夹

我可以建立所有目标

MERGE INTO Oficina_bancaria o
USING (
  SELECT TREAT( REF(c) AS REF Corriente_udt ) AS Corriente_ref
  FROM   Cuenta c
  WHERE  c.IBAN = '1654ES6639071895270420369756'
) c
ON (
    o.Codigo    = 6356
AND o.Direccion = 'Cuesta Hector Montes 15 Puerta 5  Cuenca, 02539'
AND c.Corriente_ref IS NOT NULL
)
WHEN MATCHED THEN
  UPDATE
  SET o.Cuentas = COALESCE( o.Cuentas, Corrientes_array() )
                  MULTISET UNION Corrientes_array( c.Corriente_ref );

如何仅构建target1?

我想一定是这样吗?

Cuenta

1 个答案:

答案 0 :(得分:0)

假设您在CMakeLists.txt中设置了一个可执行文件

add_executable( my_exe ${my_exe_sources} )

然后您可以致电make my_exe -j 2