Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
Conflicts:
	src/pwl/compression_pwl.c
  • Loading branch information
Roberto Di Remigio committed Oct 20, 2014
2 parents 0ad47e3 + 73a7926 commit ad998d3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 13 additions & 3 deletions cmake/compilers/CXXFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,19 @@ if(NOT DEFINED DEFUALT_CXX_FLAGS_SET OR RESET_FLAGS)
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES PGI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
# Apparently PGI doesn't let you decide which standard to use...
# The main problem with PGI is compiling Eigen.
# Assertions have to be disabled (-DNDEBUG) and optimization level has to
# be low (-O1)
# It is impossible to compile and/or run tests otherwise!!!
set(CMAKE_CXX_FLAGS "-fPIC -DNDEBUG")
if(ENABLE_64BIT_INTEGERS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0")
set(CMAKE_CXX_FLAGS_RELEASE "-O1")
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES XL)
Expand Down
2 changes: 2 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang)
set(cxxflags "${cxxflags} -stdlib=libc++")
set(linkflags "${linkflags} -stdlib=libc++")
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES PGI)
set(toolset "pgi")
else()
if(CMAKE_SYSTEM_NAME MATCHES Darwin)
set(toolset "darwin")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
// Currently, let's include it only on unix systems:
#if defined(__unix__) || defined(__unix)
#include <unistd.h>
#if ((defined __QNXNTO__) || (defined _GNU_SOURCE) || ((defined _XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600))) && (defined _POSIX_ADVISORY_INFO) && (_POSIX_ADVISORY_INFO > 0)
#if ((defined __QNXNTO__) || (defined _GNU_SOURCE) || (defined __PGI) || ((defined _XOPEN_SOURCE) && (_XOPEN_SOURCE >= 600))) && (defined _POSIX_ADVISORY_INFO) && (_POSIX_ADVISORY_INFO > 0)
#define EIGEN_HAS_POSIX_MEMALIGN 1
#endif
#endif
Expand Down

0 comments on commit ad998d3

Please sign in to comment.