Skip to content
Snippets Groups Projects
Commit da3a297e authored by Attila Krasznahorkay's avatar Attila Krasznahorkay
Browse files

Make sure that externally provided CXX flags are not discarded.

Mostly the ones coming from the CXXFLAGS environment variable,
defined in special builds of the project.
parent 4877a561
No related branches found
No related tags found
1 merge request!214C++ Flags Fix, main branch (2023.10.17.)
......@@ -21,12 +21,12 @@ set( CMAKE_CXX_EXTENSIONS FALSE CACHE BOOL "(Dis)allow using GNU extensions" )
set( CMAKE_CXX_STANDARD_REQUIRED TRUE CACHE BOOL "Require the specified C++ standard for the build" )
# Setting CMAKE_CXX_FLAGS to avoid "deprecated" warnings
set(CMAKE_CXX_FLAGS "-Wno-deprecated-declarations" ) # very basic
#set(CMAKE_CXX_FLAGS "-Wall -Werror -pedantic-errors -Wno-deprecated-declarations" ) # good enough for a quick, better check
#set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -pedantic-errors -Wno-deprecated-declarations" ) # better for a thorough check
#set(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -pedantic-errors" ) # better for an even more severe check
#set(CMAKE_CXX_FLAGS "-Weverything -Werror -pedantic-errors" ) # not recommended, it warns for really EVERYTHING!
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" ) # very basic
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -pedantic-errors -Wno-deprecated-declarations" ) # good enough for a quick, better check
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -pedantic-errors -Wno-deprecated-declarations" ) # better for a thorough check
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -pedantic-errors" ) # better for an even more severe check
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Weverything -Werror -pedantic-errors" ) # not recommended, it warns for really EVERYTHING!
# TODO: for Debug and with GCC, do we want to set the flags below by default?
# set( CMAKE_BUILD_TYPE DEBUG )
# set(CMAKE_CXX_FLAGS "-fPIC -O0 -g -gdwarf-2" )
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -O0 -g -gdwarf-2" )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment