Skip to content

Commit 57a5255

Browse files
cvanaretamontoison
authored andcommitted
No "-pg" in debug mode for Clang
1 parent ac6fa31 commit 57a5255

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ if (MSVC)
2222
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/utf-8>")
2323
else()
2424
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wnon-virtual-dtor -pedantic -Wunused-value -Wconversion")
25-
set(CMAKE_CXX_FLAGS_DEBUG "-pg")
2625
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") # disable asserts
2726
endif()
27+
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
28+
set(CMAKE_CXX_FLAGS_DEBUG "-pg")
29+
endif()
2830
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
2931
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wmaybe-uninitialized")
3032
endif()
@@ -295,4 +297,4 @@ install(TARGETS ${INSTALL_TARGETS}
295297
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} # DLLs on windows
296298
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} # Static libraries
297299
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} # Shared libraries
298-
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
300+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

0 commit comments

Comments
 (0)