1 # pforth/csrc/CMakeLists.txt
2 # Extended by Phil Burk 2021-10-31
5 file(STRINGS sources.cmake SOURCES)
8 set(PLATFORM stdio/pf_fileio_stdio.c win32_console/pf_io_win32_console.c )
12 set(PLATFORM posix/pf_io_posix.c stdio/pf_fileio_stdio.c)
16 # warning level 4 and all warnings as errors
17 add_compile_options(/W4 /WX)
19 # lots of warnings and all warnings as errors
32 -Wmissing-declarations
36 add_library(${PROJECT_NAME}_lib ${SOURCES} ${PLATFORM})
37 target_compile_definitions(${PROJECT_NAME}_lib PRIVATE PF_SUPPORT_FP)
39 # Compile the same library but with an option for the static dictionary.
40 add_library(${PROJECT_NAME}_lib_sd STATIC ${SOURCES} ${PLATFORM})
41 target_compile_definitions(${PROJECT_NAME}_lib_sd PRIVATE PF_STATIC_DIC)
42 target_compile_definitions(${PROJECT_NAME}_lib_sd PRIVATE PF_SUPPORT_FP)