Some more example code and documentation on how to use includes.
This commit is contained in:
parent
5b7b063086
commit
045d1c2809
3 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
project(fun VERSION 0.6.0 LANGUAGES C)
|
project(fun VERSION 0.6.1 LANGUAGES C)
|
||||||
|
|
||||||
set(CMAKE_C_STANDARD 11)
|
set(CMAKE_C_STANDARD 11)
|
||||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
// Demonstrates system library includes after installation to /usr/lib/fun
|
// Demonstrates system library includes after installation to /usr/lib/fun
|
||||||
|
|
||||||
|
// includes can also be done with a leading # like in C, but some programmers maybe like more clean code without a
|
||||||
|
// leading #.
|
||||||
include <hello.fun>
|
include <hello.fun>
|
||||||
include <utils/math.fun>
|
include <utils/math.fun>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// To test this you need to go to ./examples/ and test includes running ../build/fun include_local.fun
|
// To test this you need to go to ./examples/ and test includes running ../build/fun include_local.fun
|
||||||
// Local includes are always relative from the $PWD.
|
// Local includes are always relative from the $PWD using "" and system includes are located at /usr/lib/fun using <>.
|
||||||
|
|
||||||
// Demonstrates local include:
|
// Demonstrates local include:
|
||||||
// This resolves relative to the current working directory where 'fun' is executed.
|
// This resolves relative to the current working directory where 'fun' is executed.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue