Commit 405a7495 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1345 from QbaseLLC/bzimmerman_CMAKE

Bzimmerman cmake
parents c9418db6 c743bd95
This diff is collapsed.
...@@ -7,17 +7,16 @@ ...@@ -7,17 +7,16 @@
# A2X_FOUND - If false, don't attempt to use a2x. # A2X_FOUND - If false, don't attempt to use a2x.
find_program(ASCIIDOC_EXECUTABLE asciidoc asciidoc.py find_program(ASCIIDOC_EXECUTABLE asciidoc asciidoc.py
PATHS "$ENV{ASCIIDOC_ROOT}" PATHS ENV "ASCIIDOC_ROOT"
"$ENV{PROGRAMW6432}/asciidoc" ENV "PROGRAMW6432" PATH_SUFFIXES "/asciidoc"
"$ENV{PROGRAMFILES}/asciidoc" ENV "PROGRAMFILES" PATH_SUFFIXES "/asciidoc"
"$ENV{PROGRAMFILES(X86)}/asciidoc") ENV "PROGRAMFILES(X86)" PATH_SUFFIXES "/asciidoc")
find_program(A2X_EXECUTABLE a2x find_program(A2X_EXECUTABLE a2x
PATHS "$ENV{ASCIIDOC_ROOT}" PATHS ENV "ASCIIDOC_ROOT"
"$ENV{PROGRAMW6432}/asciidoc" ENV "PROGRAMW6432" PATH_SUFFIXES "/asciidoc"
"$ENV{PROGRAMFILES}/asciidoc" ENV "PROGRAMFILES" PATH_SUFFIXES "/asciidoc"
"$ENV{PROGRAMFILES(X86)}/asciidoc") ENV "PROGRAMFILES(X86)" PATH_SUFFIXES "/asciidoc")
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_ARGS(AsciiDoc REQUIRED_VARS ASCIIDOC_EXECUTABLE) find_package_handle_standard_ARGS(AsciiDoc REQUIRED_VARS ASCIIDOC_EXECUTABLE)
......
...@@ -61,16 +61,18 @@ if(NOT WIN32) ...@@ -61,16 +61,18 @@ if(NOT WIN32)
endif() endif()
foreach(test ${tests}) foreach(test ${tests})
add_executable(${test} ${test}.cpp) add_executable("${test}" "${test}.cpp")
target_link_libraries(${test} libzmq) target_link_libraries("${test}" libzmq)
set_target_properties("${test}" PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
if(RT_LIBRARY) if(RT_LIBRARY)
target_link_libraries(${test} ${RT_LIBRARY} ) target_link_libraries("${test}" "${RT_LIBRARY}" )
endif() endif()
if(WIN32) if(WIN32)
add_test(NAME ${test} WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH} COMMAND ${test}) add_test(NAME "${test}" WORKING_DIRECTORY "${LIBRARY_OUTPUT_PATH}" COMMAND "${test}")
else() else()
add_test(NAME ${test} COMMAND ${test}) add_test(NAME "${test}" COMMAND "${test}")
endif() endif()
endforeach() endforeach()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment