Skip to content

Commit ce3c000

Browse files
committed
CMake: update release-mixed-debug conditions
1 parent 57be360 commit ce3c000

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,19 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
6565
endif()
6666
endif()
6767

68-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17 -Wno-attributes -pipe -fvisibility=hidden -Wl,--no-undefined")
69-
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") This is for the future versions
70-
#set(CMAKE_CXX_STANDARD 14) #Otherwise adds -std=gnu++11 and breaks successful building
71-
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
72-
#set(CMAKE_CXX_EXTENSIONS OFF)
68+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17 -Wno-attributes -pipe -Wl,--no-undefined")
7369

7470
set(LUA_LIBRARIES luajit)
7571

7672
if(NOT CMAKE_BUILD_TYPE)
7773
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
74+
endif()
75+
76+
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
77+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
7878
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
79-
add_definitions(-DDEBUG)
79+
add_definitions(-DDEBUG -DMIXED)
80+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og")
8081
set(LUA_LIBRARIES luajit-debug)
8182
endif()
8283

0 commit comments

Comments
 (0)