Use proper braces for cmake variable references 68/191868/1
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 24 Oct 2018 13:04:12 +0000 (15:04 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 24 Oct 2018 15:10:41 +0000 (17:10 +0200)
Curly braces should be used for variable references in cmake scripts.

As a side effect this commit bypasses rpm's canonicalization issue and
makes tef_libteec.c debuggable.

Details:
1. Parenthesis instead of curly braces produce an include directory with
"//" in it that is later embeded in the binary.
2. Rpm's debugedit canonicalizes the path by removing one '/' making
it one character shorter.
3. Debugedit replaces the paths' prefixes in-place with shorter
'/usr/src/debug' adding another dummy entry in Directory Table filling
the remaining space with 'X'es.
4. Due to elf structure and in-place modification debugedit can't
handle the replacement of a path with 1 character shorter string.
5. Upstream version fails in such case but tizen.org silently ignores
it producing an invalid elf structure following the Directory Table
which is File Name Table used for list of debug sources.
6. During debugging the gdb points to non-existing file
XXXXXXXXXXXXXXXXXXXXXXXXX instead of tef_libtec.c

Change-Id: I2e5ae7ec30d4979845d03d455f754eff54427e7d

CMakeLists.txt

index 62d9aff..56b2f20 100644 (file)
@@ -52,7 +52,7 @@ ADD_DEFINITIONS("-pedantic-errors") # Make pedantic warnings into errors
 
 
 SET(TEF_API_ROOT_PATH ${PROJECT_SOURCE_DIR})
-SET(TEF_API_PATH $(TEF_API_ROOT_PATH)/api)
+SET(TEF_API_PATH ${TEF_API_ROOT_PATH}/api)
 SET(TEF_TARGET "teec")
 SET(TEF_PC tef-libteec.pc)