8000 Initial take on ChaiScript_extras being biicode enabled · ChaiScript/ChaiScript_Extras@98f3377 · GitHub
[go: up one dir, main page]

Skip to content

Commit 98f3377

Browse files
committed
Initial take on ChaiScript_extras being biicode enabled
1 parent 1ef3d38 commit 98f3377

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
10000
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
cmake_minimum_required(VERSION 2.8)
22
project(chaiscript_extras)
33

4+
if(BIICODE)
5+
include("biicode.cmake")
6+
RETURN()
7+
endif()
8+
49
# MINGW does not yet support C++11's concurrency features
510
if(MINGW)
611
option(MULTITHREAD_SUPPORT_ENABLED "Multithreaded Support Enabled" FALSE)

biicode.cmake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
set(BII_LIB_DEPS "pthread -ldl")
2+
3+
ADD_BIICODE_TARGETS()
4+
5+
6+
IF(APPLE)
7+
TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE "-std=c++11 -stdlib=libc++")
8+
ELSEIF (WIN32 OR UNIX)
9+
TARGET_COMPILE_OPTIONS(${BII_BLOCK_TARGET} INTERFACE "-std=c++11")
10+
ENDIF(APPLE)
11+

main.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include "chaiscript/chaiscript.hpp"
2+
#include "chaiscript/chaiscript_stdlib.hpp"
3+
#include "include/chaiscript/extras/math.hpp"
4+
5+
#include <iostream>
6+
7+
int main()
8+
{
9+
auto stdlib = chaiscript::Std_Lib::library();
10+
auto mathlib = chaiscript::extras::math::bootstrap();
11+
12+
chaiscript::ChaiScript chai(stdlib);
13+
chai.add(mathlib);
14+
}

0 commit comments

Comments
 (0)
0