@@ -32,16 +32,16 @@ function(add_maintenance_targets)
3232 endif ()
3333
3434 # In CMake, the components of the compiler invocation are separated into three distinct variables:
35- # - CMAKE_C_COMPILER_LAUNCHER : a semicolon-separated list of launchers or tools to precede the compiler (e.g., env or ccache).
36- # - CMAKE_C_COMPILER : the full path to the compiler binary itself (e.g., /usr/bin/clang).
37- # - CMAKE_C_COMPILER_ARG1 : a string containing initial compiler options (e.g., --target=x86_64-apple-darwin -nostdlibinc).
35+ # - CMAKE_CXX_COMPILER_LAUNCHER : a semicolon-separated list of launchers or tools to precede the compiler (e.g., env or ccache).
36+ # - CMAKE_CXX_COMPILER : the full path to the compiler binary itself (e.g., /usr/bin/clang++ ).
37+ # - CMAKE_CXX_COMPILER_ARG1 : a string containing initial compiler options (e.g., --target=x86_64-apple-darwin -nostdlibinc).
3838 # By concatenating these variables, we form the complete command line to be passed to a Python script via the CC environment variable.
39- list (JOIN CMAKE_C_COMPILER_LAUNCHER " " c_compiler_command )
40- string (STRIP "${c_compiler_command } ${CMAKE_C_COMPILER } " c_compiler_command )
41- string (STRIP "${c_compiler_command } ${CMAKE_C_COMPILER_ARG1 } " c_compiler_command )
39+ list (JOIN CMAKE_CXX_COMPILER_LAUNCHER " " cxx_compiler_command )
40+ string (STRIP "${cxx_compiler_command } ${CMAKE_CXX_COMPILER } " cxx_compiler_command )
41+ string (STRIP "${cxx_compiler_command } ${CMAKE_CXX_COMPILER_ARG1 } " cxx_compiler_command )
4242 add_custom_target (test -security-check
43- COMMAND ${CMAKE_COMMAND} -E env CC =${c_compiler_command} CFLAGS =${CMAKE_C_FLAGS } LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${PYTHON_COMMAND} ${CMAKE_SOURCE_DIR} /contrib/devtools/test -security-check.py TestSecurityChecks.test_${exe_format}
44- COMMAND ${CMAKE_COMMAND} -E env CC =${c_compiler_command} CFLAGS =${CMAKE_C_FLAGS } LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${PYTHON_COMMAND} ${CMAKE_SOURCE_DIR} /contrib/devtools/test -symbol-check.py TestSymbolChecks.test_${exe_format}
43+ COMMAND ${CMAKE_COMMAND} -E env CXX =${cxx_compiler_command} CXXFLAGS =${CMAKE_CXX_FLAGS } LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${PYTHON_COMMAND} ${CMAKE_SOURCE_DIR} /contrib/devtools/test -security-check.py TestSecurityChecks.test_${exe_format}
44+ COMMAND ${CMAKE_COMMAND} -E env CXX =${cxx_compiler_command} CXXFLAGS =${CMAKE_CXX_FLAGS } LDFLAGS=${CMAKE_EXE_LINKER_FLAGS} ${PYTHON_COMMAND} ${CMAKE_SOURCE_DIR} /contrib/devtools/test -symbol-check.py TestSymbolChecks.test_${exe_format}
4545 VERBATIM
4646 )
4747
0 commit comments