Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/bcutil/CMakeLists.txt
5985 views
1
################################################################################
2
# Copyright (c) 2017, 2020 IBM Corp. and others
3
#
4
# This program and the accompanying materials are made available under
5
# the terms of the Eclipse Public License 2.0 which accompanies this
6
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
# or the Apache License, Version 2.0 which accompanies this distribution and
8
# is available at https://www.apache.org/licenses/LICENSE-2.0.
9
#
10
# This Source Code may also be made available under the following
11
# Secondary Licenses when the conditions for such availability set
12
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
# General Public License, version 2 with the GNU Classpath
14
# Exception [1] and GNU General Public License, version 2 with the
15
# OpenJDK Assembly Exception [2].
16
#
17
# [1] https://www.gnu.org/software/classpath/license.html
18
# [2] http://openjdk.java.net/legal/assembly-exception.html
19
#
20
# 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
21
################################################################################
22
23
set(OMR_ENHANCED_WARNINGS OFF)
24
25
omr_add_tracegen(j9bcu.tdf)
26
27
# We define an interface library containing all the sources here
28
# this is to avoid having to retype the entire sources list for test/recompiled
29
j9vm_add_library(j9dyn_sources INTERFACE)
30
target_sources(j9dyn_sources
31
INTERFACE
32
${CMAKE_CURRENT_SOURCE_DIR}/bcutil.c
33
${CMAKE_CURRENT_SOURCE_DIR}/BufferManager.cpp
34
${CMAKE_CURRENT_SOURCE_DIR}/cfreader.c
35
${CMAKE_CURRENT_SOURCE_DIR}/ClassFileOracle.cpp
36
${CMAKE_CURRENT_SOURCE_DIR}/ClassFileParser.cpp
37
${CMAKE_CURRENT_SOURCE_DIR}/ClassFileWriter.cpp
38
${CMAKE_CURRENT_SOURCE_DIR}/ComparingCursor.cpp
39
${CMAKE_CURRENT_SOURCE_DIR}/ConstantPoolMap.cpp
40
${CMAKE_CURRENT_SOURCE_DIR}/defineclass.c
41
${CMAKE_CURRENT_SOURCE_DIR}/dynload.c
42
${CMAKE_CURRENT_SOURCE_DIR}/J9PortAllocationStrategy.cpp
43
${CMAKE_CURRENT_SOURCE_DIR}/jimageintf.c
44
${CMAKE_CURRENT_SOURCE_DIR}/jimagereader.c
45
${CMAKE_CURRENT_SOURCE_DIR}/jsrinliner.c
46
${CMAKE_CURRENT_SOURCE_DIR}/ROMClassBuilder.cpp
47
${CMAKE_CURRENT_SOURCE_DIR}/ROMClassCreationContext.cpp
48
${CMAKE_CURRENT_SOURCE_DIR}/ROMClassHashTable.c
49
${CMAKE_CURRENT_SOURCE_DIR}/ROMClassSegmentAllocationStrategy.cpp
50
${CMAKE_CURRENT_SOURCE_DIR}/ROMClassStringInternManager.cpp
51
${CMAKE_CURRENT_SOURCE_DIR}/ROMClassWriter.cpp
52
${CMAKE_CURRENT_SOURCE_DIR}/SRPKeyProducer.cpp
53
${CMAKE_CURRENT_SOURCE_DIR}/SRPOffsetTable.cpp
54
${CMAKE_CURRENT_SOURCE_DIR}/StringInternTable.cpp
55
# Excluded by module.xml. Why?
56
#${CMAKE_CURRENT_SOURCE_DIR}/TSFUtil.cpp
57
${CMAKE_CURRENT_SOURCE_DIR}/verifyerrstring.c
58
${CMAKE_CURRENT_SOURCE_DIR}/WritingCursor.cpp
59
60
${CMAKE_CURRENT_BINARY_DIR}/ut_j9bcu.c
61
)
62
# Add current binarydir to include path in order to get the tracegen headers
63
target_include_directories(j9dyn_sources INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
64
target_link_libraries(j9dyn_sources
65
INTERFACE
66
j9vm_interface
67
j9vm_gc_includes
68
69
j9shrcommon
70
)
71
# also add explicit dependency on running tracegen, because cmake wont pick this up outside of this dir
72
add_dependencies(j9dyn_sources trc_j9bcu)
73
74
j9vm_add_library(j9dyn STATIC)
75
target_compile_definitions(j9dyn PRIVATE J9_INTERNAL_TO_VM)
76
77
target_include_directories(j9dyn
78
PRIVATE
79
${j9vm_SOURCE_DIR}/shared_common/include
80
${omr_SOURCE_DIR}/gc/include
81
${j9vm_SOURCE_DIR}/gc_include
82
)
83
84
target_link_libraries(j9dyn
85
PRIVATE
86
j9vm_interface
87
j9dyn_sources
88
89
j9hashtable
90
)
91
92
add_subdirectory(test/dyntest)
93
add_subdirectory(test/natives)
94
add_subdirectory(test/recompiled)
95
96