summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-01-07 11:51:03 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-01-07 11:51:03 +0100
commit40477696dbe02c9ab142719cb8c5fa5fa2e1a858 (patch)
treed038458882d8b069c31c46eee8c396758ddd9623 /CMakeLists.txt
parent25da72ef231afeb7e1689eabdcf9500a5cb5d14d (diff)
Setup default build settings based on detected vespa build platform using cmake.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c71589efaca..378439a4fbb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,15 @@
# @author Arnstein Ressem
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+include(functions.cmake)
+list(APPEND CMAKE_MODULE_PATH "$ENV{HOME}/share/cmake/Modules" "/opt/vespa-deps/share/cmake/Modules")
+include(default_build_settings.cmake)
+vespa_detect_build_platform()
+message("-- Vespa build platform is ${VESPA_OS_DISTRO} ${VESPA_OS_DISTRO_VERSION}")
+vespa_use_default_cxx_compiler()
+vespa_use_default_java_home()
+vespa_use_default_build_settings()
+
project(vespa CXX C)
# allows import of project in CLion on OSX
@@ -14,7 +23,6 @@ endif()
# TODO: Move this to where it's actually needed
find_package(JNI REQUIRED)
-include(functions.cmake)
include(build_settings.cmake)
# Enable CTest unit testing