2015-12-09 23:01:04 +03:00
#------------------------------------------------------------------------------
# CLING - the C++ LLVM-based InterpreterG :)
#
# This file is dual-licensed: you can choose to license it under the University
# of Illinois Open Source License or the GNU Lesser General Public License. See
# LICENSE.TXT for details.
#------------------------------------------------------------------------------
2015-12-11 18:18:54 +03:00
# Keep symbols for JIT resolution
set ( LLVM_NO_DEAD_STRIP 1 )
2015-12-09 23:01:04 +03:00
set ( SOURCES
K e r n e l . c p p
)
2016-10-26 04:54:44 +03:00
#Solve unresolved symbols bug in unix
#See https://github.com/vgvassilev/cling/issues/114
if ( WIN32 )
#FIXME: I don't know what flags are used in windows
#to include all symbols from a static library
#Maybe the bug is not present in windows and we leave it
#as it is
set ( INTERPRETER
c l i n g I n t e r p r e t e r
)
else ( )
#Force all interpreter symbols to be present in the shared library
#this will prevent missing symbol errors because we don't know at
#link time what function calls will be made by the user of
#the shared library
2016-10-26 08:04:37 +03:00
if ( APPLE )
2016-10-26 07:25:51 +03:00
set ( INTERPRETER
2016-12-20 14:42:50 +03:00
- W l , - f o r c e _ l o a d c l i n g I n t e r p r e t e r
2016-10-26 07:25:51 +03:00
)
else ( )
set ( INTERPRETER
- W l , - - w h o l e - a r c h i v e c l i n g I n t e r p r e t e r - W l , - - n o - w h o l e - a r c h i v e
)
endif ( )
2016-10-26 04:54:44 +03:00
endif ( )
2015-12-09 23:01:04 +03:00
set ( LIBS
2015-12-11 18:18:54 +03:00
c l a n g A S T
c l a n g B a s i c
c l a n g C o d e G e n
c l a n g D r i v e r
c l a n g F r o n t e n d
c l a n g L e x
c l a n g P a r s e
c l a n g S e m a
c l a n g S e r i a l i z a t i o n
c l i n g U s e r I n t e r f a c e
c l i n g M e t a P r o c e s s o r
2016-10-26 04:54:44 +03:00
$ { I N T E R P R E T E R }
2015-12-11 18:18:54 +03:00
c l i n g U t i l s
2015-12-09 23:01:04 +03:00
)
if ( LLVM_ENABLE_PIC )
set ( ENABLE_SHARED SHARED )
endif ( )
if ( WIN32 )
set ( output_name "libclingJupyter" )
else ( )
set ( output_name "clingJupyter" )
endif ( )
2015-12-11 18:18:54 +03:00
add_cling_library ( libclingJupyter ${ ENABLE_SHARED } ${ ENABLE_STATIC }
2015-12-09 23:01:04 +03:00
O U T P U T _ N A M E $ { o u t p u t _ n a m e }
$ { S O U R C E S }
L I N K _ L I B S
$ { L I B S }
L I N K _ C O M P O N E N T S
C o r e
S u p p o r t
)
2015-12-11 18:18:54 +03:00
set_target_properties ( libclingJupyter
P R O P E R T I E S E N A B L E _ E X P O R T S 1 )
2015-12-09 23:01:04 +03:00
if ( ENABLE_SHARED )
if ( ${ CMAKE_SYSTEM_NAME } MATCHES "Darwin" )
set ( LIBCLINGJUPYTER_LINK_FLAGS " -Wl,-compatibility_version -Wl,1" )
if ( DEFINED ${ LLVM_SUBMIT_VERSION } )
set ( LIBCLINGJUPYTER_LINK_FLAGS
" $ { L I B C L I N G J U P Y T E R _ L I N K _ F L A G S } - W l , - c u r r e n t _ v e r s i o n - W l , $ { L L V M _ S U B M I T _ V E R S I O N } . $ { L L V M _ S U B M I T _ S U B V E R S I O N } " )
endif ( )
set_property ( TARGET libclingJupyter APPEND_STRING PROPERTY
L I N K _ F L A G S $ { L I B C L I N G J U P Y T E R _ L I N K _ F L A G S } )
endif ( )
endif ( )