Skip to content

Commit 8c441c2

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 39b93c1 commit 8c441c2

17 files changed

Lines changed: 82 additions & 82 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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
576576
set(pcm_name ${library_output_dir}/${libprefix}${library_output_name}_rdict.pcm)
577577
if(ARG_MODULE)
578578
if(ARG_MULTIDICT)
579-
set(newargs ${newargs} -multiDict)
579+
set(newargs ${newargs} --multiDict)
580580
set(pcm_name ${library_output_dir}/${libprefix}${library_output_name}_${dictionary}_rdict.pcm)
581581
set(rootmap_name ${library_output_dir}/${libprefix}${library_output_name}32.rootmap)
582582
else()
@@ -617,7 +617,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
617617
set(rootmap_name)
618618
set(rootmapargs)
619619
else()
620-
set(rootmapargs -rml ${library_name} -rmf ${rootmap_name})
620+
set(rootmapargs --rml ${library_name} --rmf ${rootmap_name})
621621
endif()
622622

623623
#---Get the library and module dependencies-----------------
@@ -643,7 +643,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
643643
endif()
644644

645645
if(cpp_module_file)
646-
set(newargs -cxxmodule ${newargs})
646+
set(newargs --cxxmodule ${newargs})
647647
endif()
648648

649649
#---what rootcling command to use--------------------------
@@ -658,12 +658,12 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
658658
else()
659659
if(CMAKE_PROJECT_NAME STREQUAL ROOT)
660660
if(MSVC AND CMAKE_ROOTTEST_DICT)
661-
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe -rootbuild)
661+
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe --rootbuild)
662662
else()
663663
if(APPLE)
664-
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" SDKROOT=${CMAKE_OSX_SYSROOT} $<TARGET_FILE:rootcling> -rootbuild)
664+
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" SDKROOT=${CMAKE_OSX_SYSROOT} $<TARGET_FILE:rootcling> --rootbuild)
665665
else()
666-
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> -rootbuild)
666+
set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> --rootbuild)
667667
endif()
668668
# Modules need RConfigure.h copied into include/.
669669
set(ROOTCLINGDEP rootcling rconfigure)
@@ -686,7 +686,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
686686
#---build the path exclusion switches----------------------
687687
set(excludepathsargs "")
688688
foreach(excludepath ${excludepaths})
689-
set(excludepathsargs ${excludepathsargs} -excludePath ${excludepath})
689+
set(excludepathsargs ${excludepathsargs} --excludePath ${excludepath})
690690
endforeach()
691691

692692
#---build the implicit dependencies arguments
@@ -724,7 +724,7 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
724724
725725
set(compIncPaths)
726726
foreach(implinc IN LISTS CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
727-
list(APPEND compIncPaths "-compilerI${implinc}")
727+
list(APPEND compIncPaths "--compilerI${implinc}")
728728
endforeach()
729729
730730
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
@@ -124,12 +124,12 @@ target_compile_definitions(Core PRIVATE
124124
)
125125

126126
if (runtime_cxxmodules)
127-
list(APPEND core_implicit_modules "-mSystemByproducts")
127+
list(APPEND core_implicit_modules "--mSystemByproducts")
128128
# Force generation of _Builtin_intrinsics from Core.
129-
list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics" "-mByproduct" "_Builtin_intrinsics")
130-
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
131-
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_C")
132-
list(APPEND core_implicit_modules "-mByproduct" "ROOT_Rtypes")
129+
list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics" "--mByproduct" "_Builtin_intrinsics")
130+
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
131+
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Foundation_C")
132+
list(APPEND core_implicit_modules "--mByproduct" "ROOT_Rtypes")
133133
endif(runtime_cxxmodules)
134134

135135
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
@@ -3582,7 +3582,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
35823582
rcling.Append(dict).Append("\" ");
35833583

35843584
if (produceRootmap && !useCxxModules) {
3585-
rcling += " -rml " + libname + " -rmf \"" + libmapfilename + "\" ";
3585+
rcling += " --rml " + libname + " --rmf \"" + libmapfilename + "\" ";
35863586
rcling.Append("-DR__ACLIC_ROOTMAP ");
35873587
}
35883588
rcling.Append(GetIncludePath()).Append(" -D__ACLIC__ ");
@@ -3600,7 +3600,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
36003600
// Create a modulemap
36013601
// FIXME: Merge the modulemap generation from cmake and here in rootcling.
36023602
if (useCxxModules && produceRootmap) {
3603-
rcling += " -cxxmodule ";
3603+
rcling += " --cxxmodule ";
36043604
// TString moduleMapFileName = file_dirname + "/" + libname + ".modulemap";
36053605
TString moduleName = libname + "_ACLiC_dict";
36063606
if (moduleName.BeginsWith("lib"))
@@ -3621,7 +3621,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt,
36213621
moduleMapFile << "}" << std::endl;
36223622
moduleMapFile.close();
36233623
gInterpreter->RegisterPrebuiltModulePath(build_loc.Data(), moduleMapName.Data());
3624-
rcling.Append(" \"-moduleMapFile=" + moduleMapFullPath + "\" ");
3624+
rcling.Append(" \"--moduleMapFile=" + moduleMapFullPath + "\" ");
36253625
}
36263626

36273627
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)