changeset 5170:3e6dbf4a018d

support profiling for clang
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Mar 2023 18:17:49 +0100
parents 8b74aa4f3515
children 6b07c1a14d55
files OrthancFramework/Resources/CMake/Compiler.cmake
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/Compiler.cmake	Fri Feb 24 18:07:35 2023 +0100
+++ b/OrthancFramework/Resources/CMake/Compiler.cmake	Wed Mar 01 18:17:49 2023 +0100
@@ -237,7 +237,8 @@
 
 
 if (DEFINED ENABLE_PROFILING AND ENABLE_PROFILING)
-  if (CMAKE_COMPILER_IS_GNUCXX)
+  if (CMAKE_COMPILER_IS_GNUCXX OR
+      CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg")
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")