Skip to content

Commit

Permalink
make USE_GNU_DEMANGLE cmake variable OFF on linux
Browse files Browse the repository at this point in the history
- fix setting the default USE_GNU_DEMANGLE setting to OFF on linux and freebsd
  as libiberty is now required.
- move include(shared) before include(LibIberty) so PLATFORM is defined
  • Loading branch information
kupsch committed Oct 5, 2020
1 parent 2a49c85 commit cb7fe4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ find_package(Threads)
include(Boost)
include(ThreadingBuildingBlocks)
include(ElfUtils)
include(LibIberty)

include(shared)
include(LibIberty)

if(USE_OpenMP)
find_package(OpenMP REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions cmake/LibIberty.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ endif()

# Use the GNU C++ name demangler; if yes, this disables using LibIberty
if (PLATFORM MATCHES linux OR PLATFORM MATCHES freebsd)
set(USE_GNU_DEMANGLER OFF CACHE BOOL "Use the GNU C++ name demangler")
else()
set(USE_GNU_DEMANGLER ON CACHE BOOL "Use the GNU C++ name demangler")
endif()

Expand Down

0 comments on commit cb7fe4b

Please sign in to comment.