Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CMake builds on travis #1718

Merged
merged 8 commits into from
May 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ addons:
- zip
before_install:
- jdk_switcher use oraclejdk8
env:
global:
before_script:
# - ccache -s -z
- ccache -s -z
# Exit immediately if any unexpected error occurs.
- set -e
- if [ ! `wget https://ci.eclipse.org/openj9/userContent/freemarker-2.3.8.jar -O freemarker.jar` ]; then
Expand All @@ -85,9 +83,9 @@ script:
# builds have 2 cores and 4 gigs of memory. Attempt to double provision the number of cores for the make...
# Limit number of jobs to work around g++ internal compiler error.
- export UMA_WINDOWS_PARRALLEL_HACK=-j4
- bash configure --with-freemarker-jar=$TRAVIS_BUILD_DIR/freemarker.jar --with-jobs=4 --with-num-cores=4
- make images
- bash configure --with-freemarker-jar=$TRAVIS_BUILD_DIR/freemarker.jar --with-jobs=4 --with-num-cores=4 --enable-ccache --with-cmake --disable-ddr
- make images EXTRA_CMAKE_ARGS="-DOMR_WARNINGS_AS_ERRORS=FALSE"
# Minimal sniff test - ensure java -version works.
- ./build/linux-x86_64-normal-server-release/images/jdk/bin/java -version
after_script:
# - ccache -s
- ccache -s
4 changes: 4 additions & 0 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
###

include(cmake/version.cmake)

project(j9vm VERSION ${J9VM_VERSION} LANGUAGES CXX C)

set(J9VM_OMR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/omr" CACHE PATH "Path to the OMR directory")
Expand Down Expand Up @@ -69,6 +70,9 @@ set(CMAKE_INSTALL_RPATH "\$ORIGIN")
set(OMR_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING "")
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}" CACHE STRING "" FORCE)

# Generic configuration for omr
include(cmake/omr_config.cmake)


#clean up the variables we used
set(versionStr)
Expand Down
27 changes: 27 additions & 0 deletions runtime/cmake/omr_config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
################################################################################
# Copyright (c) 2018, 2018 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
# or the Apache License, Version 2.0 which accompanies this distribution and
# is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# This Source Code may also be made available under the following
# Secondary Licenses when the conditions for such availability set
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
# General Public License, version 2 with the GNU Classpath
# Exception [1] and GNU General Public License, version 2 with the
# OpenJDK Assembly Exception [2].
#
# [1] https://www.gnu.org/software/classpath/license.html
# [2] http://openjdk.java.net/legal/assembly-exception.html
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
################################################################################

# Various config options we apply to OMR

set(OMR_EXAMPLE OFF CACHE INTERNAL "")
set(OMR_FVTEST OFF CACHE INTERNAL "")
set(OMR_GC ON CACHE INTERNAL "")
5 changes: 5 additions & 0 deletions runtime/gc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ target_link_libraries(j9gc
rt
)

target_include_directories(j9gc
PUBLIC
$<TARGET_PROPERTY:omrgc,INTERFACE_INCLUDE_DIRECTORIES>
)

install(
TARGETS j9gc
LIBRARY DESTINATION ${j9vm_SOURCE_DIR}
Expand Down
11 changes: 7 additions & 4 deletions runtime/jsigWrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@
set(CMAKE_SHARED_LIBRARY_SUFFIX ${J9VM_OLD_SHARED_SUFFIX})

add_library(jsig SHARED
jsig.c
jsig.c
)

target_link_libraries(jsig
PRIVATE
omrutil
dl
PRIVATE
j9vm_interface

omrsig
omrutil
dl
)

target_include_directories(jsig PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
Expand Down
1 change: 1 addition & 0 deletions runtime/port/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ target_link_libraries(j9prt
j9vm_interface

PRIVATE
omrsig
j9utilcore
j9pool
j9hashtable
Expand Down
1 change: 1 addition & 0 deletions runtime/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ add_library(j9vm SHARED
swalk.c
threadhelp.cpp
threadpark.c
throwexception.c
visible.c
VMAccess.cpp
vmbootlib.c
Expand Down