set flags on releases for cmake on lua module build in

This commit is contained in:
mckaygerhard 2023-09-15 05:19:41 -04:00
parent 4ba41738e0
commit 04029e14a4

View File

@ -87,6 +87,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif() endif()
message(STATUS "using gnu compiler") message(STATUS "using gnu compiler")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} ")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${CMAKE_C_FLAGS} -O1 -g")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} ${CMAKE_C_FLAGS} -g")
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang") elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1y")
@ -97,6 +101,10 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
endif() endif()
message(STATUS "using clang compiler") message(STATUS "using clang compiler")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS} ")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS} -g")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} ${CMAKE_C_FLAGS} -O1 -g")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} ${CMAKE_C_FLAGS} -g")
else() else()
if (CMAKE_VERSION VERSION_GREATER 3.0) if (CMAKE_VERSION VERSION_GREATER 3.0)
set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD 11)