Skip to content

Commit ca421ee

Browse files
committed
CMakeLists: Don't override optimization flags
The optimization flags (such as -O3) should be set externally (e.g., by specifying `catkin_make -DCMAKE_BUILD_TYPE=Release`). If we specify -O3 for all builds here, it's impossible to compile in debug mode.
1 parent 4507fea commit ca421ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ENDIF()
2323
# Version 3.4.0.18 works fine without, but adding this should not hurt
2424
CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_OPT_ARCH_NATIVE_SUPPORTED)
2525
if (COMPILER_OPT_ARCH_NATIVE_SUPPORTED)
26-
set(additional_cxx_flags "${additional_cxx_flags} -march=native -O3")
26+
set(additional_cxx_flags "${additional_cxx_flags} -march=native")
2727
endif()
2828

2929

0 commit comments

Comments
 (0)