summaryrefslogtreecommitdiff
path: root/projects/CMake
diff options
context:
space:
mode:
authorKirk Shoop <kirk.shoop@microsoft.com>2014-10-02 21:06:29 -0700
committerKirk Shoop <kirk.shoop@microsoft.com>2014-10-02 21:06:29 -0700
commit00766799d6950706167af26fe2e344f744b509ab (patch)
tree6d47c7d389c0ceb9c9665a7ee3ddd51507f10aee /projects/CMake
parent8160e1a40216a8159120d933a2a3c077321d633a (diff)
downloadRxCpp-00766799d6950706167af26fe2e344f744b509ab.tar.gz
increases warning level, fixes warnings
temporarily removes combine_latest probably breaks clang and gcc compilation both must be fixed before pushing to master
Diffstat (limited to 'projects/CMake')
-rw-r--r--projects/CMake/CMakeLists.txt19
1 files changed, 11 insertions, 8 deletions
diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt
index ae8dd39..b94247c 100644
--- a/projects/CMake/CMakeLists.txt
+++ b/projects/CMake/CMakeLists.txt
@@ -7,11 +7,16 @@ MESSAGE( STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID} )
FIND_PACKAGE(Threads)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
- list( APPEND CMAKE_CXX_FLAGS " -std=c++11 -ftemplate-depth=1024 ${CMAKE_CXX_FLAGS}")
+ add_compile_options( -Wall -Wextra -Werror )
+ add_compile_options( -std=c++11 )
+ add_compile_options( -ftemplate-depth=1024 ) # sometimes you just do what the compiler tells you
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- list( APPEND CMAKE_CXX_FLAGS " -std=c++11 ${CMAKE_CXX_FLAGS}")
+ add_compile_options( -Wall -Wextra -Werror )
+ add_compile_options( -std=c++11 )
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
- list( APPEND CMAKE_CXX_FLAGS " /DUNICODE /D_UNICODE /bigobj ${CMAKE_CXX_FLAGS}")
+ add_compile_options( /W4 /WX )
+ add_compile_options( /wd4503 ) # truncated symbol
+ add_definitions( /DUNICODE /D_UNICODE ) # it is a new millenium
endif()
@@ -21,10 +26,8 @@ get_filename_component(RXCPP_DIR "${RXCPP_DIR}" PATH)
MESSAGE( STATUS "RXCPP_DIR: " ${RXCPP_DIR} )
-
include_directories(${RXCPP_DIR}/ext/catch/include ${RXCPP_DIR}/Ix/CPP/src ${RXCPP_DIR}/Rx/v2/src)
-
set(TEST_DIR ${RXCPP_DIR}/Rx/v2/test)
# define the sources of the self test
@@ -38,8 +41,8 @@ set(TEST_SOURCES
${TEST_DIR}/sources/interval.cpp
${TEST_DIR}/sources/scope.cpp
${TEST_DIR}/operators/buffer.cpp
- ${TEST_DIR}/operators/combine_latest.1.cpp
- ${TEST_DIR}/operators/combine_latest.2.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
@@ -69,7 +72,7 @@ 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/subscribe_on.cpp
+ ${TEST_DIR}/operators/buffer.cpp
)
add_executable(one_test ${ONE_SOURCES})
TARGET_LINK_LIBRARIES(one_test ${CMAKE_THREAD_LIBS_INIT})