Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to c++17 #38

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ add_definitions(-DVC4C_VERSION="${PROJECT_VERSION}")

# append usage of C++ to compiler flags, also optimize for speed and enable all warnings
if(BUILD_DEBUG)
LIST(APPEND CMAKE_CXX_FLAGS "-std=c++11 -g3 -rdynamic -Wall -Wextra -Wold-style-cast -Wno-unused-parameter -Wno-missing-field-initializers -Wno-write-strings")
LIST(APPEND CMAKE_CXX_FLAGS "-std=c++17 -g3 -rdynamic -Wall -Wextra -Wold-style-cast -Wno-unused-parameter -Wno-missing-field-initializers -Wno-write-strings")
SET(CMAKE_BUILD_TYPE Debug)
add_definitions(-DDEBUG_MODE=1)
else()
LIST(APPEND CMAKE_CXX_FLAGS "-std=c++11 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-write-strings")
LIST(APPEND CMAKE_CXX_FLAGS "-std=c++17 -O3 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-write-strings")
SET(CMAKE_BUILD_TYPE Release)
endif()

Expand Down Expand Up @@ -230,10 +230,10 @@ if(LLVMLIB_FRONTEND)
else()
find_package(LLVM CONFIG)
if(LLVM_FOUND)

#Depending on the LLVM library version used, we need to use some other functions/headers in the LLVM library front-end
add_definitions(-DLLVM_LIBRARY_VERSION=${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR})

set(LLVM_LIBS_PATH "${LLVM_LIBRARY_DIRS}")
set(LLVM_INCLUDE_PATH "${LLVM_INCLUDE_DIRS}")
set(LLVM_LIB_FLAGS "${LLVM_DEFINITIONS}")
Expand All @@ -247,7 +247,7 @@ if(LLVMLIB_FRONTEND)
set(LLVM_SYSTEM_LIB_NAMES "")
endif()
endif()

if(LLVM_LIBS_PATH AND LLVM_INCLUDE_PATH AND LLVM_LIB_FLAGS AND LLVM_LIB_NAMES)
message(STATUS "Compiling LLVM library front-end with LLVM in version ${LLVM_LIB_VERSION} located in '${LLVM_LIBS_PATH}'")
set(ENABLE_LLVM_LIB_FRONTEND ON)
Expand Down