[mlpack-git] master: Adds -Wno-unknown-pragmas (c04b073)

gitdub at mlpack.org gitdub at mlpack.org
Mon Jun 27 10:30:49 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/34cf8d94f79c9a72ff4199676033b060cd039fcd...425324bf7fb7c86c85d10a909d8a59d4f69b7164

>---------------------------------------------------------------

commit c04b073de58fdb84aa437de2855f2b9ebf0e3032
Author: Yannis Mentekidis <mentekid at gmail.com>
Date:   Mon Jun 27 15:30:49 2016 +0100

    Adds -Wno-unknown-pragmas


>---------------------------------------------------------------

c04b073de58fdb84aa437de2855f2b9ebf0e3032
 CMakeLists.txt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b0cec2..2a3b451 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,9 +234,8 @@ add_definitions(-DBOOST_TEST_DYN_LINK)
 
 # Detect OpenMP support in a compiler. If the compiler supports OpenMP, and the
 # user has not specified that OpenMP should not be used, flags to compile with 
-# OpenMP are returned and added and the HAS_OPENMP will be set to 1. If OpenMP
-# is found but the user asked for it not to be used, HAS_OPENMP will be set to
-# 0. 
+# OpenMP are returned and added and the HAS_OPENMP is set to 1. If OpenMP is 
+# found but the user asked for it not to be used, HAS_OPENMP will be set to 0. 
 # This way we can skip calls to functions defined in omp.h with code like:
 # if(HAS_OPENMP) {omp related stuff}
 if (HAS_OPENMP)
@@ -248,7 +247,10 @@ if (HAS_OPENMP)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
   else ()
     set(HAS_OPENMP "0")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
   endif ()
+else ()
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
 endif()
 
 # Create a 'distclean' target in case the user is using an in-source build for




More information about the mlpack-git mailing list