[mlpack-git] master: only use PGO when compiling with GCC (5089102)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Tue Jan 13 14:10:24 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/717fcf8610a0411e7067dd8634d8ffc873f51e3d...1ba8341ea46ff52edb4a5c41466c1d03d1fce61f
>---------------------------------------------------------------
commit 50891024fd34bf96e71806e9cfa690ce8a5ea224
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
>---------------------------------------------------------------
50891024fd34bf96e71806e9cfa690ce8a5ea224
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