Skip to content

Commit 195fcf1

Browse files
committed
[rootcling] Use longFlags for multi-character rootcling options
This replaces many usages of `shortflags` with multiple characters whenever possible. Some flags are omitted (e.g., `-writeEmptyRootPCM`) as they cause the diff to be huge and can go in a separate PR.
1 parent 4196d8b commit 195fcf1

17 files changed

Lines changed: 81 additions & 81 deletions

File tree

README/README.CXXMODULES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ different. There are several differences which can be noticed:
306306
specific location. This way we 'mount' `/usr/include/module.modulemap`
307307
non-invasively. The reasons why we need to extend the C++ modules support
308308
beyond ROOT is described bellow.
309-
* rootcling -cxxmodule creates a single artifact *Name.pcm* after the library
309+
* rootcling --cxxmodule creates a single artifact *Name.pcm* after the library
310310
name. At a final stage, ROOT might be able to integrate the Name.pcm with the
311311
shared library itself.
312312
* Improved correctness in number of cases -- in a few cases ROOT is more
@@ -347,7 +347,7 @@ different. There are several differences which can be noticed:
347347
This command concatenates `header.h` twice before compiling it to make sure
348348
it has proper include protectors.
349349
* Enable it in `rootcling` -- rootcling can produce a C++ Modules-aware
350-
dictionary when it is invoked with `-cxxmodule` flag.
350+
dictionary when it is invoked with `--cxxmodule` flag.
351351
* Modularization of external dependencies -- if a header file is not explicitly
352352
nominated as part of a module and it is transitively included in two modules,
353353
both modules contain that header file content. In other words, the header is

bindings/pyroot/cppyy/cppyy/doc/source/utilities.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ With ``genreflex``, the mapping file can be automatically created with
243243
``--rootmap-lib=MyClassDict``, where "MyClassDict" is the name of the shared
244244
library (without the extension) build from the dictionary file.
245245
With ``rootcling``, create the same mapping file with
246-
``-rmf MyClassDict.rootmap -rml MyClassDict``.
246+
``--rmf MyClassDict.rootmap --rml MyClassDict``.
247247
It is necessary to provide the final library name explicitly, since it is
248248
only in the separate linking step where these names are fixed and those names
249249
may not match the default choice.

bindings/pyroot/cppyy/cppyy/test/make_dict_win32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_python_lib_dir():
6363
linkdef.write("#pragma link C++ defined_in %s.h;\n" % fn)
6464
linkdef.write("\n#endif")
6565

66-
DICTIONARY_CMD = "python -m cppyy_backend._rootcling -f {fn}_rflx.cxx -rmf {fn}Dict.rootmap -rml {fn}Dict.dll {fn}.h {fn}Linkdef.h".format(fn=fn)
66+
DICTIONARY_CMD = "python -m cppyy_backend._rootcling -f {fn}_rflx.cxx --rmf {fn}Dict.rootmap --rml {fn}Dict.dll {fn}.h {fn}Linkdef.h".format(fn=fn)
6767
if os.system(DICTIONARY_CMD):
6868
sys.exit(1)
6969

cmake/modules/RootMacros.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
554554
set(pcm_name ${library_output_dir}/${libprefix}${library_output_name}_rdict.pcm)
555555
if(ARG_MODULE)
556556
if(ARG_MULTIDICT)
557-
set(newargs ${newargs} -multiDict)
557+
set(newargs ${newargs} --multiDict)
558558
set(pcm_name ${library_output_dir}/${libprefix}${library_output_name}_${dictionary}_rdict.pcm)
559559
set(rootmap_name ${library_output_dir}/${libprefix}${library_output_name}32.rootmap)
560560
else()
@@ -595,7 +595,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
595595
set(rootmap_name)
596596
set(rootmapargs)
597597
else()
598-
set(rootmapargs -rml ${library_name} -rmf ${rootmap_name})
598+
set(rootmapargs --rml ${library_name} --rmf ${rootmap_name})
599599
endif()
600600

601601
#---Get the library and module dependencies-----------------
@@ -621,7 +621,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
621621
endif()
622622

623623
if(cpp_module_file)
624-
set(newargs -cxxmodule ${newargs})
624+
set(newargs --cxxmodule ${newargs})
625625
endif()
626626

627627
#---what rootcling command to use--------------------------
@@ -632,9 +632,9 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
632632
else()
633633
if(CMAKE_PROJECT_NAME STREQUAL ROOT)
634634
if(MSVC AND CMAKE_ROOTTEST_DICT)
635-
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe -rootbuild)
635+
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe --rootbuild)
636636
else()
637-
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> -rootbuild)
637+
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> --rootbuild)
638638
# Modules need RConfigure.h copied into include/.
639639
set(ROOTCLINGDEP rootcling rconfigure)
640640
endif()
@@ -648,7 +648,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
648648
#---build the path exclusion switches----------------------
649649
set(excludepathsargs "")
650650
foreach(excludepath ${excludepaths})
651-
set(excludepathsargs ${excludepathsargs} -excludePath ${excludepath})
651+
set(excludepathsargs ${excludepathsargs} --excludePath ${excludepath})
652652
endforeach()
653653

654654
#---build the implicit dependencies arguments
@@ -686,7 +686,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
686686
687687
set(compIncPaths)
688688
foreach(implinc IN LISTS CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
689-
list(APPEND compIncPaths "-compilerI${implinc}")
689+
list(APPEND compIncPaths "--compilerI${implinc}")
690690
endforeach()
691691
692692
if(cpp_module_file AND TARGET ${ARG_MODULE})

config/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rmfName = $(dir $1)$(subst .$(SOEXT),.rootmap,$(notdir $1))
4242
# generate the rootmap file
4343
# $(call rootmapModule, TREELIB)
4444
# the argument is the upper case name of the library (see the Module.mk)
45-
rootmapModule = -rml $(notdir $1) -rmf $(call rmfName, $1)
45+
rootmapModule = --rml $(notdir $1) --rmf $(call rmfName, $1)
4646

4747
# This macro returns the argument to be passed to rootcling to
4848
# properly setup the pcm

core/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ target_compile_definitions(Core PRIVATE
123123
)
124124

125125
if (runtime_cxxmodules)
126-
list(APPEND core_implicit_modules "-mSystemByproducts")
126+
list(APPEND core_implicit_modules "--mSystemByproducts")
127127
# Force generation of _Builtin_intrinsics from Core.
128-
list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics" "-mByproduct" "_Builtin_intrinsics")
129-
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
130-
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_C")
131-
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Rtypes")
128+
list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics" "--mByproduct" "_Builtin_intrinsics")
129+
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
130+
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Foundation_C")
131+
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Rtypes")
132132
endif(runtime_cxxmodules)
133133

134134
get_target_property(CORE_DICT_HEADERS Core DICT_HEADERS)

core/base/src/TSystem.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3557,7 +3557,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
35573557
rcling.Append(dict).Append("\" ");
35583558

35593559
if (produceRootmap && !useCxxModules) {
3560-
rcling += " -rml " + libname + " -rmf \"" + libmapfilename + "\" ";
3560+
rcling += " --rml " + libname + " --rmf \"" + libmapfilename + "\" ";
35613561
rcling.Append("-DR__ACLIC_ROOTMAP ");
35623562
}
35633563
rcling.Append(GetIncludePath()).Append(" -D__ACLIC__ ");
@@ -3575,7 +3575,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
35753575
// Create a modulemap
35763576
// FIXME: Merge the modulemap generation from cmake and here in rootcling.
35773577
if (useCxxModules && produceRootmap) {
3578-
rcling += " -cxxmodule ";
3578+
rcling += " --cxxmodule ";
35793579
// TString moduleMapFileName = file_dirname + "/" + libname + ".modulemap";
35803580
TString moduleName = libname + "_ACLiC_dict";
35813581
if (moduleName.BeginsWith("lib"))
@@ -3596,7 +3596,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
35963596
moduleMapFile << "}" << std::endl;
35973597
moduleMapFile.close();
35983598
gInterpreter->RegisterPrebuiltModulePath(build_loc.Data(), moduleMapName.Data());
3599-
rcling.Append(" \"-moduleMapFile=" + moduleMapFullPath + "\" ");
3599+
rcling.Append(" \"--moduleMapFile=" + moduleMapFullPath + "\" ");
36003600
}
36013601

36023602
rcling.Append(" \"").Append(filename_fullpath).Append("\" ");

core/dictgen/src/rootcling-argparse.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ def get_argparse():
9999
will not include any of the declarations already included in the
100100
pcm files loaded via -m. There can be more than one -m
101101
""")
102-
parser.add_argument('-rmf', help="""Rootmap file name
102+
parser.add_argument('--rmf', help="""Rootmap file name
103103
Name of the rootmap file. In order to be picked up by ROOT it must
104104
have .rootmap extension
105105
""")
106-
parser.add_argument('-rml', help="""Rootmap library name
106+
parser.add_argument('--rml', help="""Rootmap library name
107107
Specify the name of the library which contains the autoload keys. This
108108
switch can be specified multiple times to autoload several libraries in
109109
presence of a particular key
@@ -124,17 +124,17 @@ def get_argparse():
124124
3) If this is specified in conjunction with --multiDict, the output is
125125
libTARGETLIBRARY_DICTIONARY_rdict.pcm
126126
""")
127-
parser.add_argument('-multiDict', help="""Enable support for multiple pcms in one library
127+
parser.add_argument('--multiDict', help="""Enable support for multiple pcms in one library
128128
Needs the -s flag. See its documentation.
129129
""")
130-
parser.add_argument('-inlineInputHeader', help="""Add the argument header to the code of the dictionary
130+
parser.add_argument('--inlineInputHeader', help="""Add the argument header to the code of the dictionary
131131
This allows the header to be inlined within the dictionary
132132
""")
133-
parser.add_argument('-interpreteronly', help='No IO information in the dictionary\n')
133+
parser.add_argument('--interpreteronly', help='No IO information in the dictionary\n')
134134
parser.add_argument('-noIncludePaths', help="""Do not store the headers' directories in the dictionary
135135
Instead, rely on the environment variable $ROOT_INCLUDE_PATH at runtime
136136
""")
137-
parser.add_argument('-excludePath', help="""Specify a path to be excluded from the include paths
137+
parser.add_argument('--excludePath', help="""Specify a path to be excluded from the include paths
138138
specified for building this dictionary
139139
""")
140140
parser.add_argument('--lib-list-prefix', help="""Specify libraries needed by the header files parsed

0 commit comments

Comments
 (0)