Created
June 13, 2020 21:36
-
-
Save nhtranngoc/d2319b409cbcf431bda9e1f2d9a53ecb to your computer and use it in GitHub Desktop.
Yart's main CMakeLists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.10) | |
project(yart) | |
enable_language(C CXX) | |
if(CMAKE_CROSSCOMPILING) | |
message(STATUS "Crosscompiling enabled, using toolchain file: ${CMAKE_TOOLCHAIN_FILE}") | |
add_subdirectory(src) | |
else() | |
message(STATUS "No crosscompiling specified, compiling in /tests only.") | |
add_subdirectory(tests) | |
endif() | |
set(COMMON_C_FLAGS "-lc -lgcc -Os -g \ | |
-Wall -Werror -Wredundant-decls -Wstrict-prototypes \ | |
-fsingle-precision-constant -Wdouble-promotion -Wfloat-conversion \ | |
-fno-common -ffunction-sections -fdata-sections -MD -Wundef") | |
set(COMMON_CXX_FLAGS "-lc -lgcc -Os -Wall -Werror -std=c++11 \ | |
-fsingle-precision-constant -Wdouble-promotion -Wfloat-conversion") | |
set(CMAKE_CXX_STANDARD 11) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment