Skip to content

Commit a73c06a

Browse files
committed
[cmake] Don't export all executables
Fixes #11448
1 parent e6368d1 commit a73c06a

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

gui/cefdisplay/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ ROOT_LINKER_LIBRARY(${libname} ${CEF_sources} ${CEF_platform}
5858

5959
target_compile_definitions(${libname} PRIVATE NDEBUG)
6060

61-
ROOT_EXECUTABLE(cef_main ${CEF_MAIN} LIBRARIES ${CEF_LIBRARY} ${CEF_DLL_WRAPPER})
61+
ROOT_EXECUTABLE(cef_main ${CEF_MAIN} LIBRARIES ${CEF_LIBRARY} ${CEF_DLL_WRAPPER} CMAKENOEXPORT)
6262

6363
endif()

main/CMakeLists.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
############################################################################
1111

1212
if(NOT WIN32)
13-
ROOT_EXECUTABLE(rootn.exe rmain.cxx LIBRARIES New Core MathCore Rint)
13+
ROOT_EXECUTABLE(rootn.exe rmain.cxx LIBRARIES New Core MathCore Rint CMAKENOEXPORT)
1414
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
1515
SET_TARGET_PROPERTIES(rootn.exe PROPERTIES LINK_FLAGS "-Wl,--no-as-needed")
1616
endif()
17-
ROOT_EXECUTABLE(roots.exe roots.cxx LIBRARIES Core MathCore)
17+
ROOT_EXECUTABLE(roots.exe roots.cxx LIBRARIES Core MathCore CMAKENOEXPORT)
1818
endif()
19-
ROOT_EXECUTABLE(root.exe rmain.cxx LIBRARIES Core Rint)
19+
ROOT_EXECUTABLE(root.exe rmain.cxx LIBRARIES Core Rint CMAKENOEXPORT)
2020
if(MSVC)
2121
set(root_exports "/EXPORT:_Init_thread_abort /EXPORT:_Init_thread_epoch \
2222
/EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index \
@@ -26,23 +26,23 @@ if(MSVC)
2626
COMMAND mt -manifest ${ROOT_MANIFEST} -outputresource:${CMAKE_BINARY_DIR}/bin/root.exe)
2727
endif()
2828
if(proof)
29-
ROOT_EXECUTABLE(proofserv.exe pmain.cxx LIBRARIES Core MathCore)
29+
ROOT_EXECUTABLE(proofserv.exe pmain.cxx LIBRARIES Core MathCore CMAKENOEXPORT)
3030
endif()
3131

3232

3333
if(MSVC)
34-
ROOT_EXECUTABLE(hadd hadd.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore)
34+
ROOT_EXECUTABLE(hadd hadd.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore CMAKENOEXPORT)
3535
set_property(TARGET hadd APPEND_STRING PROPERTY LINK_FLAGS "setargv.obj")
3636
else()
37-
ROOT_EXECUTABLE(hadd hadd.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore MultiProc)
37+
ROOT_EXECUTABLE(hadd hadd.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore MultiProc CMAKENOEXPORT)
3838
if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
3939
target_link_libraries(hadd stdc++fs)
4040
endif()
4141
endif()
42-
ROOT_EXECUTABLE(rootnb.exe nbmain.cxx LIBRARIES Core)
42+
ROOT_EXECUTABLE(rootnb.exe nbmain.cxx LIBRARIES Core CMAKENOEXPORT)
4343

4444
#---ReadSpeed-------------------------------------------------------------------------------------
45-
ROOT_EXECUTABLE(rootreadspeed src/readspeed.cxx LIBRARIES RIO Tree TreePlayer ReadSpeed)
45+
ROOT_EXECUTABLE(rootreadspeed src/readspeed.cxx LIBRARIES RIO Tree TreePlayer ReadSpeed CMAKENOEXPORT)
4646

4747
#---CreateHaddCommandLineOptions------------------------------------------------------------------
4848
generateHeader(hadd
@@ -51,9 +51,9 @@ generateHeader(hadd
5151
)
5252

5353
if(fortran AND CMAKE_Fortran_COMPILER)
54-
ROOT_EXECUTABLE(g2root g2root.f LIBRARIES minicern)
54+
ROOT_EXECUTABLE(g2root g2root.f LIBRARIES minicern CMAKENOEXPORT)
5555
set_target_properties(g2root PROPERTIES COMPILE_FLAGS "-w")
56-
ROOT_EXECUTABLE(h2root h2root.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore Thread minicern)
56+
ROOT_EXECUTABLE(h2root h2root.cxx LIBRARIES Core RIO Net Hist Graf Graf3d Gpad Tree Matrix MathCore Thread minicern CMAKENOEXPORT)
5757
endif()
5858

5959
file(GLOB utils RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} python/root*)

roofit/histfactory/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ endif()
9393
# XML model specification. The ConfigParser is only built when xml is ON, so we
9494
# can't build hist2workspace without xml.
9595
if(xml)
96-
ROOT_EXECUTABLE(hist2workspace hist2workspace.cxx LIBRARIES HistFactory)
96+
ROOT_EXECUTABLE(hist2workspace hist2workspace.cxx LIBRARIES HistFactory CMAKENOEXPORT)
9797
target_compile_definitions(HistFactory PUBLIC HISTFACTORY_XML)
9898
endif()
9999

rootx/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# @author Pere Mato, CERN
1010
############################################################################
1111

12-
ROOT_EXECUTABLE(root src/rootx.cxx)
12+
ROOT_EXECUTABLE(root src/rootx.cxx CMAKENOEXPORT)
1313

1414
if (CMAKE_SYSTEM_NAME MATCHES FreeBSD)
1515
target_link_libraries(root PRIVATE util procstat)

0 commit comments

Comments
 (0)