diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 70a3f64fdf4b577b7d1ab10b2fb8fd5f58cd0332..26a9ae22aca6e16a6aed820021f6d6e75f5dc0e2 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -3,6 +3,9 @@ if(BUILD_EXAMPLES) endif() if(BUILD_EXAMPLES OR INSTALL_EXAMPLES) - add_subdirectory(producer) add_subdirectory(consumer) endif() + +if(BUILD_EXAMPLES OR INSTALL_EXAMPLES OR BUILD_INTEGRATION_TESTS) + add_subdirectory(producer) +endif() \ No newline at end of file diff --git a/examples/consumer/CMakeLists.txt b/examples/consumer/CMakeLists.txt index 3d5359f708d9f0ed2a0a64f8edd5c207be82b261..ef375cd94d8960b4c08ceb252195259b1930288f 100644 --- a/examples/consumer/CMakeLists.txt +++ b/examples/consumer/CMakeLists.txt @@ -1,7 +1,5 @@ find_package(Threads) -add_subdirectory(getnext) - if(BUILD_EXAMPLES AND BUILD_PYTHON) add_subdirectory(getnext_python) endif() diff --git a/examples/consumer/getnext/CMakeLists_separate.in b/examples/consumer/getnext/CMakeLists_separate.in deleted file mode 100644 index 3ced42a8eca4502729ff794770bd97fe1f4b4a04..0000000000000000000000000000000000000000 --- a/examples/consumer/getnext/CMakeLists_separate.in +++ /dev/null @@ -1,34 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(@TARGET_NAME@) - -set(CMAKE_CXX_STANDARD 11) - -IF(CMAKE_C_COMPILER_ID STREQUAL "GNU") - SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") -ENDIF() - -find_package (Threads) - -if (NOT "$ENV{LIBCURL_DIR}" STREQUAL "") - if (NOT LIBCURL_DIR) - set(LIBCURL_DIR $ENV{LIBCURL_DIR}) - endif() -endif () - - -set (CMAKE_PREFIX_PATH "${LIBCURL_DIR}") -find_package (CURL REQUIRED) -message (STATUS "Found cURL libraries: ${CURL_LIBRARIES}") -message (STATUS "cURL include: ${CURL_INCLUDE_DIRS}") - - -set(TARGET_NAME ${CMAKE_PROJECT_NAME}) - -set(SOURCE_FILES @SOURCE_FILES@) - -link_directories(@CMAKE_INSTALL_PREFIX@/lib) - -add_executable(${TARGET_NAME} ${SOURCE_FILES}) -target_include_directories(${TARGET_NAME} PUBLIC @CMAKE_INSTALL_PREFIX@/include) -target_link_libraries(${TARGET_NAME} asapo-consumer dl ${CURL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/tests/automatic/CMakeLists.txt b/tests/automatic/CMakeLists.txt index bf5f7ca3bc632f771b358b8e0fa5bfce39b44914..9f8a5fc243b467afd24f04547c52d9cfa35c1e23 100644 --- a/tests/automatic/CMakeLists.txt +++ b/tests/automatic/CMakeLists.txt @@ -3,9 +3,10 @@ find_package(Threads) add_subdirectory(common_scripts) - +add_subdirectory(support/getnext) add_subdirectory(common/cpp) + add_subdirectory(system_io) add_subdirectory(json_parser) diff --git a/examples/consumer/getnext/CMakeLists.txt b/tests/automatic/support/getnext/CMakeLists.txt similarity index 52% rename from examples/consumer/getnext/CMakeLists.txt rename to tests/automatic/support/getnext/CMakeLists.txt index 1f6310650bf3527c71358fcf444891c343a60993..f96714ed71b50d27a54016372658ca3b73481feb 100644 --- a/examples/consumer/getnext/CMakeLists.txt +++ b/tests/automatic/support/getnext/CMakeLists.txt @@ -13,13 +13,4 @@ set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY add_script_test("${TARGET_NAME}" "${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}") -endif() - -set (dir share/asapo/examples/consumer/${TARGET_NAME}) -install(FILES ${SOURCE_FILES} DESTINATION "${dir}") - -configure_file(CMakeLists_separate.in CMakeLists_separate.txt @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists_separate.txt DESTINATION "${dir}" RENAME CMakeLists.txt) - -configure_file(Makefile.in Makefile_LINUX @ONLY) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Makefile_LINUX DESTINATION "${dir}") +endif() \ No newline at end of file diff --git a/examples/consumer/getnext/Makefile.in b/tests/automatic/support/getnext/Makefile.in similarity index 100% rename from examples/consumer/getnext/Makefile.in rename to tests/automatic/support/getnext/Makefile.in diff --git a/examples/consumer/getnext/check_linux.sh b/tests/automatic/support/getnext/check_linux.sh similarity index 100% rename from examples/consumer/getnext/check_linux.sh rename to tests/automatic/support/getnext/check_linux.sh diff --git a/examples/consumer/getnext/check_windows.bat b/tests/automatic/support/getnext/check_windows.bat similarity index 100% rename from examples/consumer/getnext/check_windows.bat rename to tests/automatic/support/getnext/check_windows.bat diff --git a/examples/consumer/getnext/getnext.cpp b/tests/automatic/support/getnext/getnext.cpp similarity index 100% rename from examples/consumer/getnext/getnext.cpp rename to tests/automatic/support/getnext/getnext.cpp