aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorredfish <redfish@galactica.pw>2017-10-08 20:45:45 -0400
committerredfish <redfish@galactica.pw>2017-10-08 20:47:50 -0400
commit2051f89fbe670bc3734cb77f348b35b6540a964c (patch)
tree7f698e0b067ae90cdeac97ce5196520b60787fcd /CMakeLists.txt
parentMerge pull request #2548 (diff)
downloadmonero-2051f89fbe670bc3734cb77f348b35b6540a964c.tar.xz
cmake: build tests last
Keep -Werror for src, contrib and do not pass it for tests/
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 3 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f74f59e3..8d90dabec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -147,6 +147,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
enable_testing()
option(BUILD_DOCUMENTATION "Build the Doxygen documentation." ON)
+option(BUILD_TESTS "Build tests." OFF)
# Check whether we're on a 32-bit or 64-bit system
if(CMAKE_SIZEOF_VOID_P EQUAL "8")
@@ -704,20 +705,13 @@ if(SODIUM_LIBRARY)
set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
endif()
-option(BUILD_TESTS "Build tests." OFF)
+add_subdirectory(contrib)
+add_subdirectory(src)
if(BUILD_TESTS)
add_subdirectory(tests)
endif()
-# warnings are cleared only for GCC on Linux
-if (NOT (MINGW OR APPLE OR FREEBSD OR OPENBSD OR DRAGONFLY))
-add_compile_options("${WARNINGS_AS_ERRORS_FLAG}") # applies only to targets that follow
-endif()
-
-add_subdirectory(contrib)
-add_subdirectory(src)
-
if(BUILD_DOCUMENTATION)
set(DOC_GRAPHS "YES" CACHE STRING "Create dependency graphs (needs graphviz)")
set(DOC_FULLGRAPHS "NO" CACHE STRING "Create call/callee graphs (large)")