Skip to content

Commit

Permalink
CMake: update release-mixed-debug conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Nov 6, 2018
1 parent 57be360 commit ce3c000
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,19 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
endif()
endif()

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

set(LUA_LIBRARIES luajit)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()

if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_definitions(-DDEBUG)
add_definitions(-DDEBUG -DMIXED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Og")
set(LUA_LIBRARIES luajit-debug)
endif()

Expand Down

0 comments on commit ce3c000

Please sign in to comment.