summaryrefslogtreecommitdiff
path: root/ports/linux/gnu/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'ports/linux/gnu/CMakeLists.txt')
-rw-r--r--ports/linux/gnu/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/ports/linux/gnu/CMakeLists.txt b/ports/linux/gnu/CMakeLists.txt
index 4b517940..17138044 100644
--- a/ports/linux/gnu/CMakeLists.txt
+++ b/ports/linux/gnu/CMakeLists.txt
@@ -15,8 +15,16 @@ target_sources(${PROJECT_NAME}
)
target_include_directories(${PROJECT_NAME}
+ SYSTEM
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/inc
)
-target_compile_definitions(${PROJECT_NAME} PUBLIC "-D_GNU_SOURCE -DTX_LINUX_DEBUG_ENABLE") \ No newline at end of file
+target_compile_definitions(${PROJECT_NAME} PUBLIC "-D_GNU_SOURCE -DTX_LINUX_DEBUG_ENABLE")
+
+# The demo program beside the port. Off by default so the ordinary build
+# produces just the library; -DTHREADX_SAMPLE=ON adds the sample_threadx target.
+option(THREADX_SAMPLE "Build the sample program for this port" OFF)
+if(THREADX_SAMPLE)
+ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/example_build)
+endif()