summaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorKirk Shoop <kirk.shoop@microsoft.com>2015-06-04 07:52:22 -0700
committerKirk Shoop <kirk.shoop@microsoft.com>2015-06-04 08:22:07 -0700
commit001ac1e827530a3b0e7411b77c37be89c95251c0 (patch)
tree4500b72e2e15a8f2253ee72f3487530c2c276296 /projects
parent73b1adbbabb43c8bb887178de628e0871e6b350d (diff)
downloadRxCpp-001ac1e827530a3b0e7411b77c37be89c95251c0.tar.gz
CMake - require 3.2 and refactor
NOTE: binaries have moved! OSX <build>/test/rxcppv2_test <build>/examples/pythagorian/pythagorian Windows <build>\test\Debug\rxcppv2_test.exe <build>\examples\pythagorian\Debug\pythagorian.exe NOTE: cmake can be run in the root! This will make a dir named build with the binaries cmake . cmake --build .
Diffstat (limited to 'projects')
-rw-r--r--projects/CMake/CMakeLists.txt221
-rw-r--r--projects/CMake/shared.cmake47
-rw-r--r--projects/doxygen/CMakeLists.txt114
-rw-r--r--projects/scripts/install_libcxx.sh12
-rwxr-xr-xprojects/scripts/travis-install.sh49
5 files changed, 202 insertions, 241 deletions
diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt
index 76ef1ab..254cd49 100644
--- a/projects/CMake/CMakeLists.txt
+++ b/projects/CMake/CMakeLists.txt
@@ -1,222 +1,23 @@
-cmake_minimum_required(VERSION 2.8)
-
-project(rxcpp)
-
-FIND_PACKAGE(Threads)
-
-MESSAGE( STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID} )
-if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- MESSAGE( STATUS "using clang settings" )
- add_compile_options( -Wall -Wextra -Werror )
- add_compile_options( -std=c++11 -stdlib=libc++ )
- add_compile_options( -ftemplate-depth=1024 ) # sometimes you just do what the compiler tells you
-elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- MESSAGE( STATUS "using gnu settings" )
- add_compile_options( -Wall -Wextra -Werror )
- add_compile_options( -std=c++11 )
-elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
- MESSAGE( STATUS "using msvc settings" )
- add_compile_options( /W4 /WX )
- add_compile_options( /wd4503 ) # truncated symbol
- add_compile_options( /wd4702 ) # unreachable code
- add_compile_options( /bigobj )
- add_definitions( /DUNICODE /D_UNICODE ) # it is a new millenium
-endif()
+cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
+project(rxcpp VERSION 2.2.4 LANGUAGES C CXX)
# define some folders
+
get_filename_component(RXCPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
get_filename_component(RXCPP_DIR "${RXCPP_DIR}" PATH)
MESSAGE( STATUS "RXCPP_DIR: " ${RXCPP_DIR} )
-set(IX_SRC_DIR ${RXCPP_DIR}/Ix/CPP/src)
-set(RX_SRC_DIR ${RXCPP_DIR}/Rx/v2/src)
-
-include_directories(SYSTEM ${RXCPP_DIR}/ext/catch/include)
-include_directories(${IX_SRC_DIR} ${RX_SRC_DIR})
-
-set(TEST_DIR ${RXCPP_DIR}/Rx/v2/test)
+add_subdirectory(${RXCPP_DIR}/Rx/v2/test ${CMAKE_CURRENT_BINARY_DIR}/test)
-# define the sources of the self test
-set(TEST_SOURCES
- ${TEST_DIR}/test.cpp
- ${TEST_DIR}/subscriptions/observer.cpp
- ${TEST_DIR}/subscriptions/subscription.cpp
- ${TEST_DIR}/subjects/subject.cpp
- ${TEST_DIR}/sources/create.cpp
- ${TEST_DIR}/sources/defer.cpp
- ${TEST_DIR}/sources/interval.cpp
- ${TEST_DIR}/sources/scope.cpp
- ${TEST_DIR}/sources/timer.cpp
- ${TEST_DIR}/operators/amb.cpp
- ${TEST_DIR}/operators/amb_variadic.cpp
- ${TEST_DIR}/operators/buffer.cpp
- ${TEST_DIR}/operators/combine_latest.1.cpp
- ${TEST_DIR}/operators/combine_latest.2.cpp
- ${TEST_DIR}/operators/concat.cpp
- ${TEST_DIR}/operators/concat_map.cpp
- ${TEST_DIR}/operators/distinct_until_changed.cpp
- ${TEST_DIR}/operators/filter.cpp
- ${TEST_DIR}/operators/flat_map.cpp
- ${TEST_DIR}/operators/group_by.cpp
- ${TEST_DIR}/operators/lift.cpp
- ${TEST_DIR}/operators/map.cpp
- ${TEST_DIR}/operators/merge.cpp
- ${TEST_DIR}/operators/observe_on.cpp
- ${TEST_DIR}/operators/pairwise.cpp
- ${TEST_DIR}/operators/publish.cpp
- ${TEST_DIR}/operators/reduce.cpp
- ${TEST_DIR}/operators/repeat.cpp
- ${TEST_DIR}/operators/retry.cpp
- ${TEST_DIR}/operators/scan.cpp
- ${TEST_DIR}/operators/skip.cpp
- ${TEST_DIR}/operators/skip_until.cpp
- ${TEST_DIR}/operators/subscribe_on.cpp
- ${TEST_DIR}/operators/switch_on_next.cpp
- ${TEST_DIR}/operators/take.cpp
- ${TEST_DIR}/operators/take_until.cpp
- ${TEST_DIR}/operators/window.cpp
- ${TEST_DIR}/operators/zip.1.cpp
- ${TEST_DIR}/operators/zip.2.cpp
-)
-add_executable(rxcppv2_test ${TEST_SOURCES})
-TARGET_LINK_LIBRARIES(rxcppv2_test ${CMAKE_THREAD_LIBS_INIT})
-
-# define the sources of the self test
-set(ONE_SOURCES
- ${TEST_DIR}/test.cpp
- #${TEST_DIR}/operators/combine_latest.1.cpp
- #${TEST_DIR}/operators/combine_latest.2.cpp
-)
-add_executable(one_test ${ONE_SOURCES})
-TARGET_LINK_LIBRARIES(one_test ${CMAKE_THREAD_LIBS_INIT})
+add_subdirectory(${RXCPP_DIR}/projects/doxygen ${CMAKE_CURRENT_BINARY_DIR}/projects/doxygen)
set(EXAMPLES_DIR ${RXCPP_DIR}/Rx/v2/examples)
-# define the sources of the pythagorian example
-set(PYTHAGORIAN_SOURCES
- ${EXAMPLES_DIR}/pythagorian/main.cpp
-)
-add_executable(pythagorian ${PYTHAGORIAN_SOURCES})
-TARGET_LINK_LIBRARIES(pythagorian ${CMAKE_THREAD_LIBS_INIT})
-
-# define the sources of the println example
-set(PRINTLN_SOURCES
- ${EXAMPLES_DIR}/println/main.cpp
-)
-add_executable(println ${PRINTLN_SOURCES})
-TARGET_LINK_LIBRARIES(println ${CMAKE_THREAD_LIBS_INIT})
-
-# define the sources of the tests example
-set(TESTS_EXAMPLE_SOURCES
- ${EXAMPLES_DIR}/tests/main.cpp
- ${EXAMPLES_DIR}/tests/take.cpp
-)
-add_executable(tests_example ${TESTS_EXAMPLE_SOURCES})
-TARGET_LINK_LIBRARIES(tests_example ${CMAKE_THREAD_LIBS_INIT})
-
-# configure unit tests via CTest
-enable_testing()
-
-add_test(NAME RunTests COMMAND rxcppv2_test)
-
-add_test(NAME ListTests COMMAND rxcppv2_test --list-tests)
-set_tests_properties(ListTests PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ test cases")
-
-add_test(NAME ListTags COMMAND rxcppv2_test --list-tags)
-set_tests_properties(ListTags PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ tags")
-
-# target to generate documentation with Doxygen
-find_package(Doxygen)
-if(DOXYGEN_FOUND)
- # Doxygen configuration
- set(DOXY_CONF_DIR ${RXCPP_DIR}/projects/doxygen)
- set(DOXY_CONF_FILE ${DOXY_CONF_DIR}/doxygen.conf)
-
- # File with main page (index.html) content
- set(DOXY_MAIN_PAGE ${DOXY_CONF_DIR}/mainpage.dox)
-
- # Sources for processing location
- set(DOXY_INPUT_DIR "${IX_SRC_DIR} ${RX_SRC_DIR} ${DOXY_MAIN_PAGE}")
-
- # C++ examples location
- set(DOXY_EXAMPLES_SRC_DIR ${EXAMPLES_DIR}/doxygen)
- set(DOXY_EXAMPLES_BIN_DIR doxy_examples)
-
- # Directories and files allowed for include-type command (\include, \example, \snippet etc)
- set(DOXY_INCLUDE_DIR "${RXCPP_DIR} ${DOXY_EXAMPLES_SRC_DIR}")
-
- # Resulting documentation to be placed here
- set(DOXY_OUTPUT_DIR ${RXCPP_DIR}/projects/doxygen)
-
- # Make Doxygen configuration from template with placeholders
- configure_file(${DOXY_CONF_FILE}.in ${DOXY_CONF_FILE})
-
- # Target to build examples
- set(DOXY_EXAMPLE_SRC_LIST
- ${DOXY_EXAMPLES_SRC_DIR}/main.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/amb.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/as_dynamic.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/buffer.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/combine_latest.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/concat.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/concat_map.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/create.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/defer.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/distinct_until_changed.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/empty.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/error.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/filter.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/finally.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/flat_map.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/from.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/group_by.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/interval.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/iterate.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/just.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/map.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/math.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/merge.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/never.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/observe_on.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/pairwise.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/publish.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/range.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/reduce.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/repeat.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/retry.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/scan.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/scope.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/skip.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/skip_until.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/start_with.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/subscribe.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/subscribe_on.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/switch_on_next.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/take.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/take_until.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/timer.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/window.cpp
- ${DOXY_EXAMPLES_SRC_DIR}/zip.cpp
- )
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${DOXY_EXAMPLES_BIN_DIR})
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${DOXY_EXAMPLES_BIN_DIR})
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${DOXY_EXAMPLES_BIN_DIR})
- add_executable(doxy_examples EXCLUDE_FROM_ALL ${DOXY_EXAMPLE_SRC_LIST})
- TARGET_LINK_LIBRARIES(doxy_examples ${CMAKE_THREAD_LIBS_INIT})
-
- # Target to execute examples and save their output
- add_custom_command(
- OUTPUT doxy_examples_output
- COMMAND ${DOXY_EXAMPLES_BIN_DIR}/doxy_examples > ${DOXY_EXAMPLES_SRC_DIR}/output.txt
- COMMENT "Execute examples for Doxygen documentation")
-
- # Target to generate docs
- add_custom_target(doc
- COMMAND ${DOXYGEN_EXECUTABLE} ${DOXY_CONF_FILE}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS doxy_examples doxy_examples_output
- COMMENT "Generating documentation with Doxygen"
- VERBATIM)
-endif()
+add_subdirectory(${EXAMPLES_DIR}/cep ${CMAKE_CURRENT_BINARY_DIR}/examples/cep)
+add_subdirectory(${EXAMPLES_DIR}/stop ${CMAKE_CURRENT_BINARY_DIR}/examples/stop)
+add_subdirectory(${EXAMPLES_DIR}/println ${CMAKE_CURRENT_BINARY_DIR}/examples/println)
+add_subdirectory(${EXAMPLES_DIR}/pythagorian ${CMAKE_CURRENT_BINARY_DIR}/examples/pythagorian)
+add_subdirectory(${EXAMPLES_DIR}/tests ${CMAKE_CURRENT_BINARY_DIR}/examples/tests)
+add_subdirectory(${EXAMPLES_DIR}/doxygen ${CMAKE_CURRENT_BINARY_DIR}/examples/doxygen)
diff --git a/projects/CMake/shared.cmake b/projects/CMake/shared.cmake
new file mode 100644
index 0000000..c29bdcb
--- /dev/null
+++ b/projects/CMake/shared.cmake
@@ -0,0 +1,47 @@
+FIND_PACKAGE(Threads)
+
+# define some compiler settings
+
+MESSAGE( STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID} )
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ MESSAGE( STATUS "using clang settings" )
+ set(RX_COMPILE_OPTIONS
+ -Wall -Wextra -Werror -Wunused
+ -stdlib=libc++
+ -ftemplate-depth=1024
+ )
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ MESSAGE( STATUS "using gnu settings" )
+ set(RX_COMPILE_OPTIONS
+ -Wall -Wextra -Werror -Wunused
+ )
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ MESSAGE( STATUS "using msvc settings" )
+ set(RX_COMPILE_OPTIONS
+ /W4 /WX
+ /wd4503 # truncated symbol
+ /wd4702 # unreachable code
+ /bigobj
+ /DUNICODE /D_UNICODE # it is a new millenium
+ )
+endif()
+
+set(RX_COMPILE_FEATURES
+ cxx_auto_type
+ cxx_nullptr
+ cxx_decltype
+ cxx_lambdas
+ cxx_range_for
+ cxx_right_angle_brackets
+ cxx_rvalue_references
+ cxx_static_assert
+ cxx_trailing_return_types
+ cxx_alias_templates
+ cxx_variadic_templates
+ cxx_template_template_parameters
+ )
+
+set(IX_SRC_DIR ${RXCPP_DIR}/Ix/CPP/src)
+set(RX_SRC_DIR ${RXCPP_DIR}/Rx/v2/src)
+set(RX_CATCH_DIR ${RXCPP_DIR}/ext/catch/include)
diff --git a/projects/doxygen/CMakeLists.txt b/projects/doxygen/CMakeLists.txt
new file mode 100644
index 0000000..b5a0113
--- /dev/null
+++ b/projects/doxygen/CMakeLists.txt
@@ -0,0 +1,114 @@
+cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
+
+project(doxygen LANGUAGES C CXX)
+
+# define some folders
+
+get_filename_component(RXCPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
+get_filename_component(RXCPP_DIR "${RXCPP_DIR}" PATH)
+
+MESSAGE( STATUS "RXCPP_DIR: " ${RXCPP_DIR} )
+
+# target to generate documentation with Doxygen
+find_package(Doxygen)
+
+if(DOXYGEN_FOUND)
+ include(${RXCPP_DIR}/projects/CMake/shared.cmake)
+ set(EXAMPLES_DIR ${RXCPP_DIR}/Rx/v2/examples)
+
+ # Doxygen configuration
+ set(DOXY_CONF_DIR ${RXCPP_DIR}/projects/doxygen)
+ set(DOXY_CONF_FILE ${DOXY_CONF_DIR}/doxygen.conf)
+
+ # File with main page (index.html) content
+ set(DOXY_MAIN_PAGE ${DOXY_CONF_DIR}/mainpage.dox)
+
+ # Sources for processing location
+ set(DOXY_INPUT_DIR "${IX_SRC_DIR} ${RX_SRC_DIR} ${DOXY_MAIN_PAGE}")
+
+ # C++ examples location
+ set(DOXY_EXAMPLES_SRC_DIR ${EXAMPLES_DIR}/doxygen)
+ set(DOXY_EXAMPLES_BIN_DIR doxy_examples)
+
+ # Directories and files allowed for include-type command (\include, \example, \snippet etc)
+ set(DOXY_INCLUDE_DIR "${RXCPP_DIR} ${DOXY_EXAMPLES_SRC_DIR}")
+
+ # Resulting documentation to be placed here
+ set(DOXY_OUTPUT_DIR ${RXCPP_DIR}/projects/doxygen)
+
+ # Make Doxygen configuration from template with placeholders
+ configure_file(${DOXY_CONF_FILE}.in ${DOXY_CONF_FILE})
+
+ # Target to build examples
+ set(DOXY_EXAMPLE_SRC_LIST
+ ${DOXY_EXAMPLES_SRC_DIR}/main.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/amb.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/as_dynamic.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/buffer.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/combine_latest.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/concat.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/concat_map.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/create.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/defer.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/distinct_until_changed.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/empty.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/error.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/filter.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/finally.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/flat_map.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/from.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/group_by.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/interval.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/iterate.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/just.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/map.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/math.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/merge.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/never.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/observe_on.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/pairwise.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/publish.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/range.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/reduce.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/repeat.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/retry.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/scan.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/scope.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/skip.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/skip_until.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/start_with.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/subscribe.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/subscribe_on.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/switch_on_next.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/take.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/take_until.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/timer.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/window.cpp
+ ${DOXY_EXAMPLES_SRC_DIR}/zip.cpp
+ )
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${DOXY_EXAMPLES_BIN_DIR})
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${DOXY_EXAMPLES_BIN_DIR})
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${DOXY_EXAMPLES_BIN_DIR})
+ add_executable(doxy_examples EXCLUDE_FROM_ALL ${DOXY_EXAMPLE_SRC_LIST})
+ add_executable(rxcpp::doxygen::examples ALIAS doxy_examples)
+ target_compile_options(doxy_examples PUBLIC ${RX_COMPILE_OPTIONS})
+ target_compile_features(doxy_examples PUBLIC ${RX_COMPILE_FEATURES})
+ target_include_directories(doxy_examples
+ PUBLIC ${RX_SRC_DIR} ${RX_CATCH_DIR}
+ )
+ target_link_libraries(doxy_examples PRIVATE ${CMAKE_THREAD_LIBS_INIT})
+
+ # Target to execute examples and save their output
+ add_custom_command(
+ OUTPUT doxy_examples_output
+ COMMAND ${DOXY_EXAMPLES_BIN_DIR}/doxy_examples > ${DOXY_EXAMPLES_SRC_DIR}/output.txt
+ COMMENT "Execute examples for Doxygen documentation")
+
+ # Target to generate docs
+ add_custom_target(doc
+ COMMAND ${DOXYGEN_EXECUTABLE} ${DOXY_CONF_FILE}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ DEPENDS doxy_examples doxy_examples_output
+ COMMENT "Generating documentation with Doxygen"
+ VERBATIM)
+endif()
diff --git a/projects/scripts/install_libcxx.sh b/projects/scripts/install_libcxx.sh
new file mode 100644
index 0000000..b82e83b
--- /dev/null
+++ b/projects/scripts/install_libcxx.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+#
+# Install libc++ under travis
+
+svn --quiet co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
+mkdir libcxx/build
+(cd libcxx/build && cmake .. -DLIBCXX_CXX_ABI=libstdc++ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="/usr/include/c++/4.6;/usr/include/c++/4.6/x86_64-linux-gnu")
+make -C libcxx/build cxx -j2
+sudo cp libcxx/build/lib/libc++.so.1.0 /usr/lib/
+sudo cp -r libcxx/build/include/c++/v1 /usr/include/c++/v1/
+sudo ln -sf /usr/lib/libc++.so.1.0 /usr/lib/libc++.so
+sudo ln -sf /usr/lib/libc++.so.1.0 /usr/lib/libc++.so.1 \ No newline at end of file
diff --git a/projects/scripts/travis-install.sh b/projects/scripts/travis-install.sh
index 8dc46e1..683c126 100755
--- a/projects/scripts/travis-install.sh
+++ b/projects/scripts/travis-install.sh
@@ -2,44 +2,31 @@
set -e
+echo "TRAVIS_OS_NAME=$TRAVIS_OS_NAME"
+
#if OS is linux or is not set
if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then
-# wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
-# sudo add-apt-repository -y 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main'
-# sudo add-apt-repository -y "deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe"
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get clean -qq || echo "ignore clean failure"
- sudo apt-get update -qq || echo "ignore update failure"
-
- wget http://www.cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.sh
- chmod a+x cmake-3.1.3-Linux-x86_64.sh
- sudo ./cmake-3.1.3-Linux-x86_64.sh --skip-license --prefix=/usr/local
- export PATH=/usr/local/bin:$PATH
- cmake --version
-
- if [ "$CC" = gcc ]; then
- sudo apt-get install -qq --allow-unauthenticated --force-yes --fix-missing gcc-4.8 g++-4.8 || echo "ignore install failure"
-
- sudo update-alternatives --remove-all gcc || echo "ignore remove failure"
- sudo update-alternatives --remove-all g++ || echo "ignore remove failure"
-
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
+ echo "installing for linux..."
- sudo update-alternatives --config gcc
- sudo update-alternatives --config g++
+ wget http://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.sh
+ chmod a+x cmake-3.2.3-Linux-x86_64.sh
+ sudo ./cmake-3.2.3-Linux-x86_64.sh --skip-license --prefix=/usr/local
+ export PATH=/usr/local/bin:$PATH
- g++ --version
-
- sudo apt-get install --allow-unauthenticated --force-yes --fix-missing doxygen
- sudo apt-get install --allow-unauthenticated --force-yes --fix-missing graphviz
- doxygen --version
- dot -V
- fi
+ cmake --version
elif [ "$TRAVIS_OS_NAME" = osx ]; then
+ echo "installing for osx..."
+
xcode-select --install
brew update || echo "suppress failures in order to ignore warnings"
brew doctor || echo "suppress failures in order to ignore warnings"
- brew list cmake || brew install cmake || echo "suppress failures in order to ignore warnings"
+ brew list cmake || echo "suppress failures in order to ignore warnings"
+ sudo brew uninstall --force cmake || "suppress failures in order to ignore warnings"
+ brew search cmake || echo "suppress failures in order to ignore warnings"
+ brew install cmake || echo "suppress failures in order to ignore warnings"
+ brew upgrade cmake || echo "suppress failures in order to ignore warnings"
+
+ cmake --version
fi
+