diff options
author | FormerLurker <hochgebe@gmail.com> | 2020-05-12 21:15:31 +0300 |
---|---|---|
committer | FormerLurker <hochgebe@gmail.com> | 2020-05-12 21:15:31 +0300 |
commit | 1b83f4db6dfb74490aaae48d7e6315b939741131 (patch) | |
tree | db7f5095ec6a6c60d24a2feb50de26f075fd0fed /CMakeLists.txt | |
parent | c300661efdb7742a00d3329cf93f3b49620841b2 (diff) |
Set C++ 11 in cmake, fix Clang c++11 bug
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fe8293..61983d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,9 @@ cmake_minimum_required (VERSION "3.16") # You can tweak some common (for all subprojects) stuff here. For example: project(Build C CXX) +# Use C++ 11 +set (CMAKE_CXX_STANDARD 11) + set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) set(CMAKE_DISABLE_SOURCE_CHANGES ON) @@ -17,6 +20,11 @@ if (WIN32) set(CMAKE_SHARED_LIBRARY_PREFIX "") endif () +# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS. +if (POLICY CMP0025) + cmake_policy(SET CMP0025 NEW) +endif () + # add subdirectories to compile in order of inheritance add_subdirectory(${CMAKE_SOURCE_DIR}/GcodeProcessorLib) add_subdirectory(${CMAKE_SOURCE_DIR}/ArcWelder) |