Skip to content

Instantly share code, notes, and snippets.

@asmuth
Created December 22, 2014 11:58
Show Gist options
  • Save asmuth/f69fd5eb4d304cdf1d3b to your computer and use it in GitHub Desktop.
Save asmuth/f69fd5eb4d304cdf1d3b to your computer and use it in GitHub Desktop.
most simple CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
project(blahblah)
set(PROJ_SOURCES
src/a.cc
src/b.cc)
if(APPLE)
set(CMAKE_CXX_FLAGS "-std=c++0x -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
endif()
add_executable(blahblah ${PROJ_SOURCES})
find_package(Threads)
target_link_libraries(blahblah ${CMAKE_THREAD_LIBS_INIT})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment