aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-10-15 18:58:31 +0200
committerRiccardo Spagni <ric@spagni.net>2017-10-15 18:58:31 +0200
commit845afb519161b61ccbc0d007679c0ee0e2f969ae (patch)
tree01dc1d8272de06fdfa69156ace2aa15e6c121f90
parentMerge pull request #2610 (diff)
parentcmake: build tests last (diff)
downloadmonero-845afb519161b61ccbc0d007679c0ee0e2f969ae.tar.xz
Merge pull request #2613
2051f89f cmake: build tests last (redfish)
-rw-r--r--CMakeLists.txt12
-rw-r--r--contrib/CMakeLists.txt5
-rw-r--r--src/CMakeLists.txt5
3 files changed, 13 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dadd528db..3eddfca0e 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")
@@ -713,20 +714,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)")
diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt
index 7bd411aed..e7c501ed2 100644
--- a/contrib/CMakeLists.txt
+++ b/contrib/CMakeLists.txt
@@ -26,5 +26,10 @@
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 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(epee)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 57ff28bfc..6fb08b645 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -34,6 +34,11 @@ if (WIN32 OR STATIC)
add_definitions(-DMINIUPNP_STATICLIB)
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()
+
function (monero_private_headers group)
source_group("${group}\\Private"
FILES