Skip to content

Commit

Permalink
fix CMakeLists again...
Browse files Browse the repository at this point in the history
  • Loading branch information
sewenew committed Sep 21, 2018
1 parent 776108e commit eb3e6ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,11 @@ try_compile(HAVE_STRING_VIEW
"${CMAKE_CURRENT_BINARY_DIR}/try_compile"
"${CMAKE_CURRENT_SOURCE_DIR}/try_compile/try_string_view.cpp")

if (HAVE_STRING_VIEW)
add_definitions(-DHAVE_STRING_VIEW)
endif()

try_compile(HAVE_OPTIONAL
"${CMAKE_CURRENT_BINARY_DIR}/try_compile"
"${CMAKE_CURRENT_SOURCE_DIR}/try_compile/try_optional.cpp")

if (HAVE_OPTIONAL)
add_definitions(-DHAVE_OPTIONAL)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${PROJECT_SOURCE_DIR}/config.h)

add_subdirectory(test)

Expand Down
2 changes: 2 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#cmakedefine HAVE_STRING_VIEW
#cmakedefine HAVE_OPTIONAL

0 comments on commit eb3e6ae

Please sign in to comment.