forked from ducalex/retro-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.cmake
More file actions
34 lines (28 loc) · 1.04 KB
/
base.cmake
File metadata and controls
34 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/components")
set(SDKCONFIG_DEFAULTS "${CMAKE_CURRENT_LIST_DIR}/base.sdkconfig")
execute_process(
COMMAND git describe --tags --abbrev=5 --long --dirty=*
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE PROJECT_VER
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT PROJECT_VER)
string(TIMESTAMP TODAY "%Y.%m.%d")
set(PROJECT_VER "${TODAY}-nogit")
endif()
macro(rg_setup_compile_options)
component_compile_options(-O3 -Wno-comment -Wno-error=comment)
component_compile_options(-DIS_LITTLE_ENDIAN)
component_compile_options(${ARGV})
if($ENV{ENABLE_PROFILING})
# Still debating whether -fno-inline is necessary or not...
component_compile_options(-DENABLE_PROFILING -finstrument-functions)
endif()
if($ENV{ENABLE_DEBUGGING})
component_compile_options(-DENABLE_DEBUGGING)
endif()
if($ENV{ENABLE_NETPLAY})
component_compile_options(-DENABLE_NETPLAY)
endif()
endmacro()