Skip to content

Commit

Permalink
trying to adopt cmake for both clang and gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
valpo committed Aug 17, 2015
1 parent d519927 commit 07e98b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
project(sudoku)
cmake_minimum_required(VERSION 2.8)

# needed for clang-3.6 on ubuntu 14.04
include_directories(/usr/include/c++/4.9 /usr/include/x86_64-linux-gnu/c++/4.9)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # this is clang
add_definitions(-std=c++1y -stdlib=libc++ -g -Wall -O0 -fconstexpr-steps=2147483647)
set(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # this is gcc
add_definitions(-std=c++1y -g -Wall -O0)
set(CMAKE_EXE_LINKER_FLAGS "")
endif()

add_subdirectory(classic)
add_subdirectory(constexpr)
Expand Down
2 changes: 1 addition & 1 deletion constexpr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aux_source_directory(. SRC_LIST)
add_definitions(-std=c++1z -stdlib=libc++ -g -Wall -O0 -fconstexpr-steps=2147483647)
add_definitions(-std=c++1z)
# -ftemplate-backtrace-limit=0
#add_definitions(-std=c++1y)
add_executable(constexpr_sudoku ${SRC_LIST})
Expand Down

0 comments on commit 07e98b7

Please sign in to comment.