Path: blob/master/runtime/bcutil/CMakeLists.txt
5985 views
################################################################################1# Copyright (c) 2017, 2020 IBM Corp. and others2#3# This program and the accompanying materials are made available under4# the terms of the Eclipse Public License 2.0 which accompanies this5# distribution and is available at https://www.eclipse.org/legal/epl-2.0/6# or the Apache License, Version 2.0 which accompanies this distribution and7# is available at https://www.apache.org/licenses/LICENSE-2.0.8#9# This Source Code may also be made available under the following10# Secondary Licenses when the conditions for such availability set11# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12# General Public License, version 2 with the GNU Classpath13# Exception [1] and GNU General Public License, version 2 with the14# OpenJDK Assembly Exception [2].15#16# [1] https://www.gnu.org/software/classpath/license.html17# [2] http://openjdk.java.net/legal/assembly-exception.html18#19# 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-exception20################################################################################2122set(OMR_ENHANCED_WARNINGS OFF)2324omr_add_tracegen(j9bcu.tdf)2526# We define an interface library containing all the sources here27# this is to avoid having to retype the entire sources list for test/recompiled28j9vm_add_library(j9dyn_sources INTERFACE)29target_sources(j9dyn_sources30INTERFACE31${CMAKE_CURRENT_SOURCE_DIR}/bcutil.c32${CMAKE_CURRENT_SOURCE_DIR}/BufferManager.cpp33${CMAKE_CURRENT_SOURCE_DIR}/cfreader.c34${CMAKE_CURRENT_SOURCE_DIR}/ClassFileOracle.cpp35${CMAKE_CURRENT_SOURCE_DIR}/ClassFileParser.cpp36${CMAKE_CURRENT_SOURCE_DIR}/ClassFileWriter.cpp37${CMAKE_CURRENT_SOURCE_DIR}/ComparingCursor.cpp38${CMAKE_CURRENT_SOURCE_DIR}/ConstantPoolMap.cpp39${CMAKE_CURRENT_SOURCE_DIR}/defineclass.c40${CMAKE_CURRENT_SOURCE_DIR}/dynload.c41${CMAKE_CURRENT_SOURCE_DIR}/J9PortAllocationStrategy.cpp42${CMAKE_CURRENT_SOURCE_DIR}/jimageintf.c43${CMAKE_CURRENT_SOURCE_DIR}/jimagereader.c44${CMAKE_CURRENT_SOURCE_DIR}/jsrinliner.c45${CMAKE_CURRENT_SOURCE_DIR}/ROMClassBuilder.cpp46${CMAKE_CURRENT_SOURCE_DIR}/ROMClassCreationContext.cpp47${CMAKE_CURRENT_SOURCE_DIR}/ROMClassHashTable.c48${CMAKE_CURRENT_SOURCE_DIR}/ROMClassSegmentAllocationStrategy.cpp49${CMAKE_CURRENT_SOURCE_DIR}/ROMClassStringInternManager.cpp50${CMAKE_CURRENT_SOURCE_DIR}/ROMClassWriter.cpp51${CMAKE_CURRENT_SOURCE_DIR}/SRPKeyProducer.cpp52${CMAKE_CURRENT_SOURCE_DIR}/SRPOffsetTable.cpp53${CMAKE_CURRENT_SOURCE_DIR}/StringInternTable.cpp54# Excluded by module.xml. Why?55#${CMAKE_CURRENT_SOURCE_DIR}/TSFUtil.cpp56${CMAKE_CURRENT_SOURCE_DIR}/verifyerrstring.c57${CMAKE_CURRENT_SOURCE_DIR}/WritingCursor.cpp5859${CMAKE_CURRENT_BINARY_DIR}/ut_j9bcu.c60)61# Add current binarydir to include path in order to get the tracegen headers62target_include_directories(j9dyn_sources INTERFACE ${CMAKE_CURRENT_BINARY_DIR})63target_link_libraries(j9dyn_sources64INTERFACE65j9vm_interface66j9vm_gc_includes6768j9shrcommon69)70# also add explicit dependency on running tracegen, because cmake wont pick this up outside of this dir71add_dependencies(j9dyn_sources trc_j9bcu)7273j9vm_add_library(j9dyn STATIC)74target_compile_definitions(j9dyn PRIVATE J9_INTERNAL_TO_VM)7576target_include_directories(j9dyn77PRIVATE78${j9vm_SOURCE_DIR}/shared_common/include79${omr_SOURCE_DIR}/gc/include80${j9vm_SOURCE_DIR}/gc_include81)8283target_link_libraries(j9dyn84PRIVATE85j9vm_interface86j9dyn_sources8788j9hashtable89)9091add_subdirectory(test/dyntest)92add_subdirectory(test/natives)93add_subdirectory(test/recompiled)949596