Skip to content

Commit

Permalink
examples: fix adding executables
Browse files Browse the repository at this point in the history
  • Loading branch information
igchor committed Jun 16, 2018
1 parent 9534637 commit 204ca6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ link_directories(${PMEMOBJ_LIBRARY_DIRS})
add_cppstyle(examples-common ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
add_check_whitespace(examples-common ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)

function(add_example name srcs)
function(add_example name)
set(srcs ${ARGN})
prepend(srcs ${CMAKE_CURRENT_SOURCE_DIR} ${srcs})
add_executable(example-${name} ${srcs})
add_cppstyle(examples-${name} ${srcs})
Expand Down
3 changes: 2 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,13 @@ set(CMAKE_REQUIRED_INCLUDES ${SAVED_CMAKE_REQUIRED_INCLUDES})
add_cppstyle("tests-common" ${CMAKE_CURRENT_SOURCE_DIR}/common/*.*pp)
add_check_whitespace("tests-common" ${CMAKE_CURRENT_SOURCE_DIR}/common/*.*pp)

function(build_test name srcs)
function(build_test name)
# skip posix tests
if(${name} MATCHES "posix$" AND WIN32)
return()
endif()

set(srcs ${ARGN})
prepend(srcs ${CMAKE_CURRENT_SOURCE_DIR} ${srcs})

add_cppstyle(tests-${name} ${srcs})
Expand Down

0 comments on commit 204ca6f

Please sign in to comment.