A compound of formula (I) or a pharmaceutically acceptable salt thereof, wherein: (i) X is C-R 3 ; m is 0 or 1; n is selected from 0, 1 and 2; and L is selected from - (CH 2 ) p -, -O-, -OCH 2 -, -CH 2 OCH 2 -, -CF 2 CH 2 -, -CH=CH-, -(CR 16 R 17 ) q -CH 2 O-, and -CH 2 CF 2 -; or (ii) X is N; m is 1; n is 1 or 2; and L is -(CH 2 ) p - or -CF 2 CH 2 -; p is selected from 1, 2 and 3; q is 0 or 1; A is selected from: (i) C 6 -C 14 -aryl substituted with R 4 , R 5 and R 6 ; (ii) 5- to 14-membered heteroaryl substituted with R 7 , R 8 and R 9 ; and (iii) 3- to 14-membered heterocycloalkyl substituted with R 10 , R 11 and R 12 ; R 1 is hydrogen or C 1-6 -alkyl; R 2 is selected from hydrogen, C 1-6 -alkyl and hydroxy-C 1-6 -alkyl; R 3 is selected from hydrogen, halogen, hydroxy, C 1-6 -alkoxy, C 1-6 -alkyl and halo-C 1-6 -alkyl; each of R 4 , R 5 , R 6 , R 7 , R 8 , R 9 , R 10 , R 11 and R 12 is independently selected from hydrogen, halogen, cyano, hydroxy, C 1-6 -alkyl, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 1-6 -alkanoyl, halo-C 1-5 -alkyl-CH(OH)-, C 1-6 -alkoxy, halo-C 1-6 -alkoxy, SF 5 , CH 3 SO 2 , C 3-10 -cycloalkyl, C 3-10 -cycloalkyl substituted with R 13 , 3- to 14-membered heterocycloalkyl, 3- to 14-membered heterocycloalkyl substituted with R 14 and R 15 , 5- to 14-membered heteroaryl, C6-C14-aryl, Ce-C 14-aryloxy, halo-C 6 -C 14 -aryl, and halo-C 6 -C 14 -aryloxy; each of R 13 , R 14 , and R 15 is independently selected from C 1-6 -alkyl, C 1-6 -alkoxy, halo-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halogen, and hydroxy; and R 16 and R 17 , taken together with the carbon atom to which they are attached, form a C 3-10 -cycloalkyl. (i) X is C-R 3 ; m is 0 or 1; n is selected from 0, 1 and 2; and L is selected from - (CH 2 ) p -, -O-, -OCH 2 -, -CH 2 OCH 2 -, -CF 2 CH 2 -, -CH=CH-, -(CR 16 R 17 ) q -CH 2 O-, and -CH 2 CF 2 -; or (ii) X is N; m is 1; n is 1 or 2; and L is -(CH 2 ) p - or -CF 2 CH 2 -; p is selected from 1, 2 and 3; q is 0 or 1; A is selected from: (i) C 6 -C 14 -aryl substituted with R 4 , R 5 and R 6 ; (ii) 5- to 14-membered heteroaryl substituted with R 7 , R 8 and R 9 ; and (iii) 3- to 14-membered heterocycloalkyl substituted with R 10 , R 11 and R 12 ; (i) C 6 -C 14 -aryl substituted with R 4 , R 5 and R 6 ; (ii) 5- to 14-membered heteroaryl substituted with R 7 , R 8 and R 9 ; and (iii) 3- to 14-membered heterocycloalkyl substituted with R 10 , R 11 and R 12 ; R 1 is hydrogen or C 1-6 -alkyl; R 2 is selected from hydrogen, C 1-6 -alkyl and hydroxy-C 1-6 -alkyl; R 3 is selected from hydrogen, halogen, hydroxy, C 1-6 -alkoxy, C 1-6 -alkyl and halo-C 1-6 -alkyl; each of R 4 , R 5 , R 6 , R 7 , R 8 , R 9 , R 10 , R 11 and R 12 is independently selected from hydrogen, halogen, cyano, hydroxy, C 1-6 -alkyl, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 1-6 -alkanoyl, halo-C 1-5 -alkyl-CH(OH)-, C 1-6 -alkoxy, halo-C 1-6 -alkoxy, SF 5 , CH 3 SO 2 , C 3-10 -cycloalkyl, C 3-10 -cycloalkyl substituted with R 13 , 3- to 14-membered heterocycloalkyl, 3- to 14-membered heterocycloalkyl substituted with R 14 and R 15 , 5- to 14-membered heteroaryl, C6-C14-aryl, Ce-C 14-aryloxy, halo-C 6 -C 14 -aryl, and halo-C 6 -C 14 -aryloxy; each of R 13 , R 14 , and R 15 is independently selected from C 1-6 -alkyl, C 1-6 -alkoxy, halo-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halogen, and hydroxy; and R 16 and R 17 , taken together with the carbon atom to which they are attached, form a C 3-10 -cycloalkyl. <EOS>