Closed
Description
bash-5.2$ cmake --workflow --preset gcc-debug
Executing workflow step 1 of 3: configure preset "gcc-debug"
Preset CMake variables:
CMAKE_BUILD_TYPE="Debug"
CMAKE_CXX_COMPILER="g++"
CMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined"
CMAKE_CXX_STANDARD="17"
-- The CXX compiler identification is AppleClang 16.0.0.16000026
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ - broken
CMake Error at /usr/local/Cellar/cmake/3.30.5/share/cmake/Modules/CMakeTestCXXCompiler.cmake:73 (message):
The C++ compiler
"/usr/bin/g++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/Users/clausklein/Workspace/cpp/beman-project/exemplar/build/gcc-debug/CMakeFiles/CMakeScratch/TryCompile-h6rdZf'
Run Build Command(s): /usr/local/bin/ninja -v cmTC_abf57
[1/2] /usr/bin/g++ -fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined -std=gnu++17 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacosx-version-min=14.7 -MD -MT CMakeFiles/cmTC_abf57.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_abf57.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_abf57.dir/testCXXCompiler.cxx.o -c /Users/clausklein/Workspace/cpp/beman-project/exemplar/build/gcc-debug/CMakeFiles/CMakeScratch/TryCompile-h6rdZf/testCXXCompiler.cxx
FAILED: CMakeFiles/cmTC_abf57.dir/testCXXCompiler.cxx.o
/usr/bin/g++ -fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=leak -fsanitize=undefined -std=gnu++17 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk -mmacosx-version-min=14.7 -MD -MT CMakeFiles/cmTC_abf57.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_abf57.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_abf57.dir/testCXXCompiler.cxx.o -c /Users/clausklein/Workspace/cpp/beman-project/exemplar/build/gcc-debug/CMakeFiles/CMakeScratch/TryCompile-h6rdZf/testCXXCompiler.cxx
clang++: error: unsupported option '-fsanitize=leak' for target 'x86_64-apple-darwin23.6.0'
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (project)
-- Configuring incomplete, errors occurred!
bash-5.2$