From b5313fca3c8aee3da895940e30d6e62f5f373821 Mon Sep 17 00:00:00 2001 From: Stephen Tu Date: Tue, 13 Jan 2015 11:05:08 -0800 Subject: [PATCH] only use PGO when compiling with GCC clang does not support this option --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 884d415333..3bc3859673 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,11 +49,11 @@ else() endif(DEBUG) # Profiling CFLAGS. Turn profiling information on. -if(PROFILE) +if(CMAKE_COMPILER_IS_GNUCC AND PROFILE) 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") -endif(PROFILE) +endif(CMAKE_COMPILER_IS_GNUCC AND PROFILE) # If the user asked for extra Armadillo debugging output, turn that on. if(ARMA_EXTRA_DEBUG)