blob: 2b511db46ea58185415cb025e78975f5611b23a9 [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
cmake_minimum_required (VERSION 2.8.10)
# The only way we found to override the compiler is setting these variables
# prior to the project definition. Otherwise enable_language() sets these
# variables and gcc will be picked up instead. Also, new versions of cmake will
# complain if one compiler is first set (say to gcc via enable_language), and
# then we later switch it to (say) clang.
SET (CMAKE_C_COMPILER "clang")
SET (CMAKE_CXX_COMPILER "clang++")
project(lossmin)
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -std=c++11 -stdlib=libstdc++ -fcolor-diagnostics")
enable_language(C)
enable_language(CXX)
include_directories(..)
add_executable(sample sample.cc)
target_link_libraries(sample
loss_functions
minimizers)
add_subdirectory(losses)
add_subdirectory(minimizers)