Skip to content

Commit

Permalink
cmake workaround for #2246 for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Feb 16, 2019
1 parent 7f65afb commit 4d8bbe2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Expand Up @@ -102,6 +102,9 @@ endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CLANG 1)
# Force C++11 as workaround for #2246
add_definitions(-D__cplusplus=201103L)

This comment has been minimized.

Copy link
@egorpugin

egorpugin Feb 16, 2019

Contributor

Looks like bad solution.

This comment has been minimized.

Copy link
@zdenop

zdenop Feb 17, 2019

Author Contributor

Well c++11 vs c++14 code is based on __cplusplus...
And I did not find any other quick solution how to not use c++14 code....

This comment has been minimized.

Copy link
@stweil

stweil Feb 17, 2019

Contributor

I committed a better solution now, so this one should be reverted.

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined")
endif()

if (WIN32)
Expand Down

0 comments on commit 4d8bbe2

Please sign in to comment.