Skip to content

Instantly share code, notes, and snippets.

@RantyDave
Created July 9, 2018 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RantyDave/1e6b72eb1992c7ddce820181a293c8b0 to your computer and use it in GitHub Desktop.
Save RantyDave/1e6b72eb1992c7ddce820181a293c8b0 to your computer and use it in GitHub Desktop.
CMake file to enable and link c++ 17 using the XCode 10 beta
cmake_minimum_required (VERSION 3.11)
project (YOUR_PROJECT_NAME)
set(CMAKE_CXX_COMPILER /Library/Developer/CommandLineTools/usr/bin/clang++)
set(CMAKE_CXX_STANDARD 17)
include_directories(SYSTEM /Library/Developer/CommandLineTools/usr/include/c++/v1)
link_directories(/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib)
set(CMAKE_EXE_LINKER_FLAGS -lc++)
add_executable(YOUR_PROJECT_NAME file another_file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment