Fixing profiler build flags.

CPU_PROFILE_ENABLED was moved to profiler sub-project build.

Signed-off-by: alexander <alexander.efremov@arm.com>
Change-Id: I8191c83c7ae0f618769449d7d25fe58876cbcf05
diff --git a/source/profiler/CMakeLists.txt b/source/profiler/CMakeLists.txt
index f70e86d..e59dc01 100644
--- a/source/profiler/CMakeLists.txt
+++ b/source/profiler/CMakeLists.txt
@@ -34,6 +34,10 @@
 # Profiling API depends on the logging interface and the HAL library.
 target_link_libraries(profiler PRIVATE log hal)
 
+# Set the CPU profiling defintiion
+target_compile_definitions(profiler PUBLIC
+        $<$<BOOL:${CPU_PROFILE_ENABLED}>:CPU_PROFILE_ENABLED>)
+
 message(STATUS "*******************************************************")
 message(STATUS "Library                                : " profiler)
 message(STATUS "CMAKE_SYSTEM_PROCESSOR                 : " ${CMAKE_SYSTEM_PROCESSOR})