Commit 35951304 authored by Emmanuel Thomé's avatar Emmanuel Thomé
Browse files

do not force -g

parent 90dd8db3
Pipeline #268644 failed with stages
in 55 minutes and 56 seconds
...@@ -146,7 +146,7 @@ if(CMAKE_COMPILER_IS_GNUCC) ...@@ -146,7 +146,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
# prevents the definition of __STRICT_ANSI__ # prevents the definition of __STRICT_ANSI__
# #
# Ditto for C++, with the c++98/gnu++98 subtlety. # Ditto for C++, with the c++98/gnu++98 subtlety.
set (CMAKE_C_FLAGS "-g -W -Wall ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "-W -Wall ${CMAKE_C_FLAGS}")
if (MINGW) if (MINGW)
set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
else() else()
...@@ -156,7 +156,7 @@ if(CMAKE_COMPILER_IS_GNUCC) ...@@ -156,7 +156,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "-g -W -Wall ${CMAKE_CXX_FLAGS}") set (CMAKE_CXX_FLAGS "-W -Wall ${CMAKE_CXX_FLAGS}")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(FATAL_ERROR "cado-nfs requires gcc version 5 or greater") message(FATAL_ERROR "cado-nfs requires gcc version 5 or greater")
endif() endif()
...@@ -177,8 +177,8 @@ endif() ...@@ -177,8 +177,8 @@ endif()
if(CMAKE_C_COMPILER_ID MATCHES "Intel") if(CMAKE_C_COMPILER_ID MATCHES "Intel")
message(STATUS "Applying flags for icc") message(STATUS "Applying flags for icc")
set (CMAKE_C_FLAGS "-g -W -Wall -wd13200,13203 ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "-W -Wall -wd13200,13203 ${CMAKE_C_FLAGS}")
set (CMAKE_CXX_FLAGS "-g -W -Wall -wd13200,13203,3058 ${CMAKE_CXX_FLAGS}") set (CMAKE_CXX_FLAGS "-W -Wall -wd13200,13203,3058 ${CMAKE_CXX_FLAGS}")
set (CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
# only icc>=15 is full c++11 compliant, it seems. But 14 will do. # only icc>=15 is full c++11 compliant, it seems. But 14 will do.
...@@ -190,13 +190,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "Intel") ...@@ -190,13 +190,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "Intel")
message(STATUS "Not enabling C++11 support for ICC 14, see bug #21416") message(STATUS "Not enabling C++11 support for ICC 14, see bug #21416")
else() else()
# don't set standard flags explicitly. The default seems fine. # don't set standard flags explicitly. The default seems fine.
# set (CMAKE_CXX_FLAGS "-std=gnu++98 -g -W -Wall ${CMAKE_CXX_FLAGS}") # set (CMAKE_CXX_FLAGS "-std=gnu++98 -W -Wall ${CMAKE_CXX_FLAGS}")
endif() endif()
endif() endif()
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME
STREQUAL "Darwin" AND CMAKE_C_COMPILER_ID MATCHES "Clang" ) STREQUAL "Darwin" AND CMAKE_C_COMPILER_ID MATCHES "Clang" )
set (CMAKE_C_FLAGS "-std=c99 -g -W -Wall ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "-std=c99 -W -Wall ${CMAKE_C_FLAGS}")
endif() endif()
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME
...@@ -216,7 +216,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "^Clang") ...@@ -216,7 +216,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "^Clang")
set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
set (HAVE_CXX11 1) set (HAVE_CXX11 1)
message(STATUS "Enabling C++11 support") message(STATUS "Enabling C++11 support")
set (CMAKE_CXX_FLAGS "-std=c++11 -g -W -Wall ${CMAKE_CXX_FLAGS}") set (CMAKE_CXX_FLAGS "-std=c++11 -W -Wall ${CMAKE_CXX_FLAGS}")
endif() endif()
endif() endif()
message(STATUS "CFLAGS=${CMAKE_C_FLAGS} (synthetized)") message(STATUS "CFLAGS=${CMAKE_C_FLAGS} (synthetized)")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment