[mlpack-git] master: only use PGO when compiling with GCC (b5313fc)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:12:23 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit b5313fca3c8aee3da895940e30d6e62f5f373821
Author: Stephen Tu <tu.stephenl at gmail.com>
Date: Tue Jan 13 11:05:08 2015 -0800
only use PGO when compiling with GCC
clang does not support this option
>---------------------------------------------------------------
b5313fca3c8aee3da895940e30d6e62f5f373821
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 884d415..3bc3859 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)
More information about the mlpack-git
mailing list