diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index baf1200..007d586 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -21,13 +21,28 @@ add_executable(${PROJECT_NAME} main.cpp ) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17 ) -if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + target_compile_options(${PROJECT_NAME} + PRIVATE + -std=gnu++17 + ) +else() target_compile_options(${PROJECT_NAME} + PRIVATE + -std=c++17 + ) +endif() + +if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + add_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror -ansi -pedantic ) diff --git a/tests/and_then_test.cpp b/tests/and_then_test.cpp index 9be1d87..8cc0a3f 100644 --- a/tests/and_then_test.cpp +++ b/tests/and_then_test.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include using namespace rvarago::absent; diff --git a/tests/attempt_test.cpp b/tests/attempt_test.cpp index 9f5803c..946bb5a 100644 --- a/tests/attempt_test.cpp +++ b/tests/attempt_test.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include using namespace rvarago::absent; diff --git a/tests/either/and_then_test.cpp b/tests/either/and_then_test.cpp index 4f8ca9f..0110030 100644 --- a/tests/either/and_then_test.cpp +++ b/tests/either/and_then_test.cpp @@ -2,7 +2,7 @@ #include -#include +#include using namespace rvarago::absent::adapters::either; using rvarago::absent::adapters::types::either; diff --git a/tests/either/attempt_test.cpp b/tests/either/attempt_test.cpp index d7050a2..9e2f0ed 100644 --- a/tests/either/attempt_test.cpp +++ b/tests/either/attempt_test.cpp @@ -2,7 +2,7 @@ #include -#include +#include using namespace rvarago::absent::adapters::either; using rvarago::absent::adapters::types::either; diff --git a/tests/either/eval_test.cpp b/tests/either/eval_test.cpp index 16b933e..2eac882 100644 --- a/tests/either/eval_test.cpp +++ b/tests/either/eval_test.cpp @@ -2,7 +2,7 @@ #include -#include +#include using namespace rvarago::absent::adapters::either; using rvarago::absent::adapters::types::either; diff --git a/tests/either/for_each_test.cpp b/tests/either/for_each_test.cpp index d792b67..7ec8be1 100644 --- a/tests/either/for_each_test.cpp +++ b/tests/either/for_each_test.cpp @@ -2,7 +2,7 @@ #include -#include +#include using namespace rvarago::absent::adapters::either; using rvarago::absent::adapters::types::either; diff --git a/tests/either/transform_test.cpp b/tests/either/transform_test.cpp index f6fd8d2..c14325f 100644 --- a/tests/either/transform_test.cpp +++ b/tests/either/transform_test.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include using namespace rvarago::absent::adapters::either; using rvarago::absent::adapters::types::either; diff --git a/tests/eval_test.cpp b/tests/eval_test.cpp index 420d84c..fcf95eb 100644 --- a/tests/eval_test.cpp +++ b/tests/eval_test.cpp @@ -2,7 +2,7 @@ #include -#include +#include using namespace rvarago::absent; diff --git a/tests/execution_status_test.cpp b/tests/execution_status_test.cpp index 87ca610..8a47014 100644 --- a/tests/execution_status_test.cpp +++ b/tests/execution_status_test.cpp @@ -3,7 +3,7 @@ #include -#include +#include using namespace rvarago::absent; diff --git a/tests/for_each_test.cpp b/tests/for_each_test.cpp index 560cd0e..ed6c70d 100644 --- a/tests/for_each_test.cpp +++ b/tests/for_each_test.cpp @@ -2,7 +2,7 @@ #include -#include +#include using namespace rvarago::absent; diff --git a/tests/from_variant_test.cpp b/tests/from_variant_test.cpp index 47725ea..2460383 100644 --- a/tests/from_variant_test.cpp +++ b/tests/from_variant_test.cpp @@ -2,7 +2,7 @@ #include -#include +#include using namespace rvarago::absent; diff --git a/tests/main.cpp b/tests/main.cpp index 2380d6b..b8686e2 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -1,2 +1,4 @@ #define CATCH_CONFIG_MAIN -#include \ No newline at end of file +#include + +int main() { return 0; } diff --git a/tests/transform_test.cpp b/tests/transform_test.cpp index 08abd3b..4e2a39d 100644 --- a/tests/transform_test.cpp +++ b/tests/transform_test.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include using namespace rvarago::absent;