Skip to content

Commit

Permalink
fix std::variant detection
Browse files Browse the repository at this point in the history
having variant header is not enough, c++17 has to be enabled to
have support for std::variant
  • Loading branch information
vigsterkr committed May 22, 2018
1 parent 72c23c1 commit 21e932b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Expand Up @@ -47,9 +47,6 @@ if (MSVC)
endif()
endif()

include(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX("variant" HAVE_STD_VARIANT)

### FIXME: remove these flags when the codebase
# is cleared up
set(HAVE_CXX11 ON)
Expand Down
1 change: 1 addition & 0 deletions src/shogun/CMakeLists.txt
Expand Up @@ -325,6 +325,7 @@ ENDIF()
#### LAPACK
include(ShogunFindLAPACK)

CHECK_CXX_SOURCE_COMPILES("#include <variant>\n int main(int argc, char** argv) { return 0; }" HAVE_STD_VARIANT)
# variant
IF (NOT HAVE_STD_VARIANT)
include(external/variant)
Expand Down

0 comments on commit 21e932b

Please sign in to comment.