mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
go: finish Go node-type
This commit is contained in:
parent
03729ed35c
commit
fa398a2cf7
90 changed files with 1048 additions and 5205 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,3 +17,4 @@ python/dist/
|
|||
*.pyc
|
||||
|
||||
python/.eggs/
|
||||
go/lib/_obj/
|
||||
|
|
|
@ -61,6 +61,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
include(FetchContent)
|
||||
include(FindPkgConfig)
|
||||
include(CheckIncludeFile)
|
||||
include(FeatureSummary)
|
||||
|
@ -108,6 +109,12 @@ find_program(PROTOBUFC_COMPILER NAMES protoc-c)
|
|||
find_program(PROTOBUF_COMPILER NAMES protoc)
|
||||
find_program(GO NAMES go)
|
||||
|
||||
# Optionally download Go toolchain
|
||||
option(DOWNLOAD_GO "Download Go toolchain" ON)
|
||||
if(NOT GO AND DOWNLOAD_GO)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/cmake/Go.cmake")
|
||||
endif()
|
||||
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig")
|
||||
|
||||
pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.9)
|
||||
|
@ -222,6 +229,10 @@ if(WITH_FPGA)
|
|||
add_subdirectory(fpga)
|
||||
endif()
|
||||
|
||||
if(WITH_GO)
|
||||
add_subdirectory(go)
|
||||
endif()
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(etc)
|
||||
add_subdirectory(lib)
|
||||
|
|
52
cmake/Go.cmake
Normal file
52
cmake/Go.cmake
Normal file
|
@ -0,0 +1,52 @@
|
|||
# determine GOARCH for target
|
||||
set(GO_TARGET_ARCH_OVERRIDE
|
||||
""
|
||||
CACHE STRING "overrides the 'GOARCH' variable")
|
||||
if (GO_TARGET_ARCH_OVERRIDE)
|
||||
set(GO_TARGET_ARCH "${GO_TARGET_ARCH_OVERRIDE}")
|
||||
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
|
||||
set(GO_TARGET_ARCH "amd64")
|
||||
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "i[3-6]86")
|
||||
set(GO_TARGET_ARCH "386")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "(ppc64|ppc64le|arm|arm64|s390x)")
|
||||
set(GO_TARGET_ARCH "${CMAKE_SYSTEM_NAME}")
|
||||
else ()
|
||||
message(FATAL_ERROR "Unable to auto-determine GOARCH. Please set GO_TARGET_ARCH_OVERRIDE manually.")
|
||||
endif ()
|
||||
|
||||
# determine GOOS for target
|
||||
set(GO_TARGET_OS_OVERRIDE
|
||||
""
|
||||
CACHE STRING "overrides the 'GOOS' variable")
|
||||
if (GO_TARGET_OS_OVERRIDE)
|
||||
set(GO_TARGET_OS "${GO_TARGET_OS_OVERRIDE}")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(GO_TARGET_OS "linux")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Android")
|
||||
set(GO_TARGET_OS "android")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(GO_TARGET_OS "windows")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
set(GO_TARGET_OS "freebsd")
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(GO_TARGET_OS "darwin")
|
||||
else ()
|
||||
message(FATAL_ERROR "Unable to auto-determine GOOS. Please set GO_TARGET_OS_OVERRIDE manually.")
|
||||
endif ()
|
||||
|
||||
FetchContent_Declare(
|
||||
go
|
||||
URL https://go.dev/dl/go1.17.8.${GO_TARGET_OS}-${GO_TARGET_ARCH}.tar.gz
|
||||
)
|
||||
|
||||
message(STATUS "Downloading Go toolchain for ${GO_TARGET_OS}/${GO_TARGET_ARCH}")
|
||||
FetchContent_MakeAvailable(go)
|
||||
|
||||
find_program(GO
|
||||
NAMES go
|
||||
NO_DEFAULT_PATH
|
||||
PATHS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/_deps/go-src/bin
|
||||
${go_SOURCE_DIR}
|
||||
)
|
||||
|
1
go/CMakeLists.txt
Normal file
1
go/CMakeLists.txt
Normal file
|
@ -0,0 +1 @@
|
|||
add_subdirectory(lib)
|
29
go/go.mod
29
go/go.mod
|
@ -2,4 +2,31 @@ module git.rwth-aachen.de/acs/public/villas/node/go
|
|||
|
||||
go 1.17
|
||||
|
||||
require github.com/google/uuid v1.3.0
|
||||
require (
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/pion/webrtc/v3 v3.1.24
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/pion/datachannel v1.5.2 // indirect
|
||||
github.com/pion/dtls/v2 v2.1.3 // indirect
|
||||
github.com/pion/ice/v2 v2.2.1 // indirect
|
||||
github.com/pion/interceptor v0.1.7 // indirect
|
||||
github.com/pion/logging v0.2.2 // indirect
|
||||
github.com/pion/mdns v0.0.5 // indirect
|
||||
github.com/pion/randutil v0.1.0 // indirect
|
||||
github.com/pion/rtcp v1.2.9 // indirect
|
||||
github.com/pion/rtp v1.7.4 // indirect
|
||||
github.com/pion/sctp v1.8.2 // indirect
|
||||
github.com/pion/sdp/v3 v3.0.4 // indirect
|
||||
github.com/pion/srtp/v2 v2.0.5 // indirect
|
||||
github.com/pion/stun v0.3.5 // indirect
|
||||
github.com/pion/transport v0.13.0 // indirect
|
||||
github.com/pion/turn/v2 v2.0.8 // indirect
|
||||
github.com/pion/udp v0.1.1 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 // indirect
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
)
|
||||
|
|
152
go/go.sum
152
go/go.sum
|
@ -1,2 +1,154 @@
|
|||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/pion/datachannel v1.5.2 h1:piB93s8LGmbECrpO84DnkIVWasRMk3IimbcXkTQLE6E=
|
||||
github.com/pion/datachannel v1.5.2/go.mod h1:FTGQWaHrdCwIJ1rw6xBIfZVkslikjShim5yr05XFuCQ=
|
||||
github.com/pion/dtls/v2 v2.1.2/go.mod h1:o6+WvyLDAlXF7YiPB/RlskRoeK+/JtuaZa5emwQcWus=
|
||||
github.com/pion/dtls/v2 v2.1.3 h1:3UF7udADqous+M2R5Uo2q/YaP4EzUoWKdfX2oscCUio=
|
||||
github.com/pion/dtls/v2 v2.1.3/go.mod h1:o6+WvyLDAlXF7YiPB/RlskRoeK+/JtuaZa5emwQcWus=
|
||||
github.com/pion/ice/v2 v2.2.1 h1:R3MeuJZpU1ty3diPqpD5OxaxcZ15eprAc+EtUiSoFxg=
|
||||
github.com/pion/ice/v2 v2.2.1/go.mod h1:Op8jlPtjeiycsXh93Cs4jK82C9j/kh7vef6ztIOvtIQ=
|
||||
github.com/pion/interceptor v0.1.7 h1:HThW0tIIKT9RRoDWGURe8rlZVOx0fJHxBHpA0ej0+bo=
|
||||
github.com/pion/interceptor v0.1.7/go.mod h1:Lh3JSl/cbJ2wP8I3ccrjh1K/deRGRn3UlSPuOTiHb6U=
|
||||
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
||||
github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
||||
github.com/pion/mdns v0.0.5 h1:Q2oj/JB3NqfzY9xGZ1fPzZzK7sDSD8rZPOvcIQ10BCw=
|
||||
github.com/pion/mdns v0.0.5/go.mod h1:UgssrvdD3mxpi8tMxAXbsppL3vJ4Jipw1mTCW+al01g=
|
||||
github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
|
||||
github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
|
||||
github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
|
||||
github.com/pion/rtcp v1.2.9 h1:1ujStwg++IOLIEoOiIQ2s+qBuJ1VN81KW+9pMPsif+U=
|
||||
github.com/pion/rtcp v1.2.9/go.mod h1:qVPhiCzAm4D/rxb6XzKeyZiQK69yJpbUDJSF7TgrqNo=
|
||||
github.com/pion/rtp v1.7.0/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/rtp v1.7.4 h1:4dMbjb1SuynU5OpA3kz1zHK+u+eOCQjW3MAeVHf1ODA=
|
||||
github.com/pion/rtp v1.7.4/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/sctp v1.8.0/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
|
||||
github.com/pion/sctp v1.8.2 h1:yBBCIrUMJ4yFICL3RIvR4eh/H2BTTvlligmSTy+3kiA=
|
||||
github.com/pion/sctp v1.8.2/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
|
||||
github.com/pion/sdp/v3 v3.0.4 h1:2Kf+dgrzJflNCSw3TV5v2VLeI0s/qkzy2r5jlR0wzf8=
|
||||
github.com/pion/sdp/v3 v3.0.4/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk=
|
||||
github.com/pion/srtp/v2 v2.0.5 h1:ks3wcTvIUE/GHndO3FAvROQ9opy0uLELpwHJaQ1yqhQ=
|
||||
github.com/pion/srtp/v2 v2.0.5/go.mod h1:8k6AJlal740mrZ6WYxc4Dg6qDqqhxoRG2GSjlUhDF0A=
|
||||
github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
|
||||
github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
|
||||
github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
|
||||
github.com/pion/transport v0.12.3/go.mod h1:OViWW9SP2peE/HbwBvARicmAVnesphkNkCVZIWJ6q9A=
|
||||
github.com/pion/transport v0.13.0 h1:KWTA5ZrQogizzYwPEciGtHPLwpAjE91FgXnyu+Hv2uY=
|
||||
github.com/pion/transport v0.13.0/go.mod h1:yxm9uXpK9bpBBWkITk13cLo1y5/ur5VQpG22ny6EP7g=
|
||||
github.com/pion/turn/v2 v2.0.8 h1:KEstL92OUN3k5k8qxsXHpr7WWfrdp7iJZHx99ud8muw=
|
||||
github.com/pion/turn/v2 v2.0.8/go.mod h1:+y7xl719J8bAEVpSXBXvTxStjJv3hbz9YFflvkpcGPw=
|
||||
github.com/pion/udp v0.1.1 h1:8UAPvyqmsxK8oOjloDk4wUt63TzFe9WEJkg5lChlj7o=
|
||||
github.com/pion/udp v0.1.1/go.mod h1:6AFo+CMdKQm7UiA0eUPA8/eVCTx8jBIITLZHc9DWX5M=
|
||||
github.com/pion/webrtc/v3 v3.1.24 h1:s9PuwisrgHe1FTqfwK4p3T7rXtAHaUNhycbdMjADT28=
|
||||
github.com/pion/webrtc/v3 v3.1.24/go.mod h1:mO/yv7fBN3Lp7YNlnYcTj1jtpvNvssJG+7eh6itZ4xM=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE=
|
||||
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
|
34
go/lib/CMakeLists.txt
Normal file
34
go/lib/CMakeLists.txt
Normal file
|
@ -0,0 +1,34 @@
|
|||
set(LIB libvillas-go.a)
|
||||
set(HEADER libvillas-go.h)
|
||||
|
||||
file(GLOB_RECURSE SRCS *.go)
|
||||
file(GLOB_RECURSE NODE_SRCS ../pkg/nodes/*)
|
||||
|
||||
list(FILTER SRCS EXCLUDE REGEX /_obj/)
|
||||
list(FILTER NODE_SRCS EXCLUDE REGEX /_obj/)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${HEADER}
|
||||
DEPENDS ${SRCS}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND env "GOPATH=${GOPATH}" "CGO_ENABLED=1" ${GO} tool cgo -exportheader "${CMAKE_CURRENT_BINARY_DIR}/${HEADER}" -- -I "${CMAKE_CURRENT_SOURCE_DIR}/../../include" ${SRCS}
|
||||
COMMENT "Generating CGo header ${HEADER}"
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LIB}
|
||||
DEPENDS ${SRCS} ${NODE_SRCS}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND env "PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig" "GOPATH=${GOPATH}" "CGO_ENABLED=1" "CGO_CFLAGS=-I${CMAKE_CURRENT_SOURCE_DIR}/../../include" ${GO} build -buildmode=c-archive -o "${CMAKE_CURRENT_BINARY_DIR}/${LIB}" ${CMAKE_GO_FLAGS} .
|
||||
COMMENT "Building CGo library ${LIB}"
|
||||
COMMAND_EXPAND_LISTS)
|
||||
|
||||
add_custom_target(villas-go-lib DEPENDS ${LIB})
|
||||
add_custom_target(villas-go-header DEPENDS ${HEADER})
|
||||
|
||||
add_library(villas-go STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(villas-go villas-go-lib)
|
||||
set_target_properties(villas-go
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${LIB}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
7
go/lib/README.md
Normal file
7
go/lib/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Writing custom node-type in Go
|
||||
|
||||
This directory contains the required glue code for implementing custom node-types in the Go programming language.
|
||||
|
||||
Contents of this directory will be compiled into a static library and linked into 'libvillas.so'.
|
||||
|
||||
Have a look at the 'go.example' node-type implemented in '<villas-node-git>/go/pkg/nodes/example' for an example on how to implement your own node-type in Go.
|
14
go/lib/bridge.c
Normal file
14
go/lib/bridge.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include <villas/nodes/go.h>
|
||||
|
||||
void bridge_go_register_node_factory(_go_register_node_factory_cb cb, _go_plugin_list pl, char *name, char *desc, int flags)
|
||||
{
|
||||
cb(pl, name, desc, flags);
|
||||
}
|
||||
|
||||
void bridge_go_logger_log(_go_logger_log_cb cb, _go_logger l, int level, char *msg)
|
||||
{
|
||||
cb(l, level, msg);
|
||||
free(msg);
|
||||
}
|
183
go/lib/lib.go
Normal file
183
go/lib/lib.go
Normal file
|
@ -0,0 +1,183 @@
|
|||
package main
|
||||
|
||||
// #include <stdint.h>
|
||||
// #include <villas/nodes/go.h>
|
||||
// void bridge_go_register_node_factory(_go_register_node_factory_cb cb, _go_plugin_list pl, char *name, char *desc, int flags);
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
|
||||
"git.rwth-aachen.de/acs/public/villas/node/go/pkg/nodes"
|
||||
|
||||
_ "git.rwth-aachen.de/acs/public/villas/node/go/pkg/nodes/example"
|
||||
_ "git.rwth-aachen.de/acs/public/villas/node/go/pkg/nodes/loopback"
|
||||
_ "git.rwth-aachen.de/acs/public/villas/node/go/pkg/nodes/webrtc"
|
||||
|
||||
"git.rwth-aachen.de/acs/public/villas/node/go/pkg/errors"
|
||||
)
|
||||
|
||||
func main() {}
|
||||
|
||||
type NodeType struct {
|
||||
nodes.NodeType
|
||||
}
|
||||
|
||||
//export RegisterGoNodeTypes
|
||||
func RegisterGoNodeTypes(cb C._go_register_node_factory_cb, pl C._go_plugin_list) {
|
||||
ntm := nodes.NodeTypes()
|
||||
|
||||
for n, t := range ntm {
|
||||
C.bridge_go_register_node_factory(cb, pl, C.CString(n), C.CString(t.Description), C.int(t.Flags))
|
||||
}
|
||||
}
|
||||
|
||||
//export NewGoNode
|
||||
func NewGoNode(t *C.char) C.uintptr_t {
|
||||
var nodeTypes = nodes.NodeTypes()
|
||||
|
||||
typ, ok := nodeTypes[C.GoString(t)]
|
||||
if !ok {
|
||||
return 0
|
||||
}
|
||||
|
||||
node := typ.Constructor()
|
||||
return C.uintptr_t(cgo.NewHandle(node))
|
||||
}
|
||||
|
||||
//export GoNodeSetLogger
|
||||
func GoNodeSetLogger(p C.uintptr_t, cb C._go_logger_log_cb, l C._go_logger) {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
n.SetLogger(NewVillasLogger(cb, l))
|
||||
}
|
||||
|
||||
//export GoNodeClose
|
||||
func GoNodeClose(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Close()))
|
||||
}
|
||||
|
||||
//export GoNodePrepare
|
||||
func GoNodePrepare(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Prepare()))
|
||||
}
|
||||
|
||||
//export GoNodeParse
|
||||
func GoNodeParse(p C.uintptr_t, c *C.char) C.int {
|
||||
scfg := C.GoString(c)
|
||||
bcfg := []byte(scfg)
|
||||
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Parse(bcfg)))
|
||||
}
|
||||
|
||||
//export GoNodeCheck
|
||||
func GoNodeCheck(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Check()))
|
||||
}
|
||||
|
||||
//export GoNodeStart
|
||||
func GoNodeStart(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Start()))
|
||||
}
|
||||
|
||||
//export GoNodeStop
|
||||
func GoNodeStop(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Stop()))
|
||||
}
|
||||
|
||||
//export GoNodePause
|
||||
func GoNodePause(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Pause()))
|
||||
}
|
||||
|
||||
//export GoNodeResume
|
||||
func GoNodeResume(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Resume()))
|
||||
}
|
||||
|
||||
//export GoNodeRestart
|
||||
func GoNodeRestart(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Restart()))
|
||||
}
|
||||
|
||||
//export GoNodeRead
|
||||
func GoNodeRead(p C.uintptr_t, buf *C.char, sz C.int) (C.int, C.int) {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
|
||||
src, err := n.Read()
|
||||
if err != nil {
|
||||
return -1, C.int(errors.ErrorToInt(err))
|
||||
}
|
||||
|
||||
// Create slice which is backed by buf
|
||||
dst := (*[1 << 31]byte)(unsafe.Pointer(buf))[:sz]
|
||||
lsz := copy(dst, src)
|
||||
|
||||
return C.int(lsz), 0
|
||||
}
|
||||
|
||||
//export GoNodeWrite
|
||||
func GoNodeWrite(p C.uintptr_t, data []byte) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Write(data)))
|
||||
}
|
||||
|
||||
//export GoNodeReverse
|
||||
func GoNodeReverse(p C.uintptr_t) C.int {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
return C.int(errors.ErrorToInt(n.Reverse()))
|
||||
}
|
||||
|
||||
//export GoNodeGetPollFDs
|
||||
func GoNodeGetPollFDs(p C.uintptr_t) ([]int, C.int) {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
f, err := n.PollFDs()
|
||||
if err != nil {
|
||||
return nil, C.int(errors.ErrorToInt(err))
|
||||
}
|
||||
|
||||
return f, 0
|
||||
}
|
||||
|
||||
//export GoNodeGetNetemFDs
|
||||
func GoNodeGetNetemFDs(p C.uintptr_t) ([]int, C.int) {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
f, err := n.NetemFDs()
|
||||
if err != nil {
|
||||
return nil, C.int(errors.ErrorToInt(err))
|
||||
}
|
||||
|
||||
return f, 0
|
||||
}
|
||||
|
||||
//export GoNodeDetails
|
||||
func GoNodeDetails(p C.uintptr_t) *C.char {
|
||||
h := cgo.Handle(p)
|
||||
n := h.Value().(nodes.Node)
|
||||
d := n.Details()
|
||||
return C.CString(d)
|
||||
}
|
104
go/lib/logger.go
Normal file
104
go/lib/logger.go
Normal file
|
@ -0,0 +1,104 @@
|
|||
package main
|
||||
|
||||
// #include <stdlib.h>
|
||||
// #include <villas/nodes/go.h>
|
||||
// void bridge_go_logger_log(_go_logger_log_cb cb, _go_logger l, int level, char *msg);
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
type LogLevel int
|
||||
|
||||
const (
|
||||
// https://github.com/gabime/spdlog/blob/a51b4856377a71f81b6d74b9af459305c4c644f8/include/spdlog/common.h#L76
|
||||
LogLevelTrace LogLevel = iota
|
||||
LogLevelDebug LogLevel = iota
|
||||
LogLevelInfo LogLevel = iota
|
||||
LogLevelWarn LogLevel = iota
|
||||
LogLevelError LogLevel = iota
|
||||
LogLevelCritical LogLevel = iota
|
||||
LogLevelOff LogLevel = iota
|
||||
)
|
||||
|
||||
type VillasLogger struct {
|
||||
inst C._go_logger
|
||||
cb C._go_logger_log_cb
|
||||
}
|
||||
|
||||
func NewVillasLogger(cb C._go_logger_log_cb, l C._go_logger) *VillasLogger {
|
||||
return &VillasLogger{
|
||||
cb: cb,
|
||||
inst: l,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *VillasLogger) log(lvl LogLevel, msg string) {
|
||||
C.bridge_go_logger_log(l.cb, l.inst, C.int(lvl), C.CString(msg))
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Trace(msg string) {
|
||||
l.log(LogLevelTrace, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Debug(msg string) {
|
||||
l.log(LogLevelDebug, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Info(msg string) {
|
||||
l.log(LogLevelInfo, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Warn(msg string) {
|
||||
l.log(LogLevelWarn, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Error(msg string) {
|
||||
l.log(LogLevelError, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Critical(msg string) {
|
||||
l.log(LogLevelCritical, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Tracef(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelTrace, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Debugf(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelDebug, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Infof(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelInfo, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Warnf(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelWarn, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Errorf(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelError, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Criticalf(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelCritical, msg)
|
||||
}
|
||||
|
||||
func (l *VillasLogger) Panic(msg string) {
|
||||
l.Critical(msg)
|
||||
fmt.Println("Paniced")
|
||||
os.Exit(-1)
|
||||
}
|
||||
func (l *VillasLogger) Panicf(format string, args ...interface{}) {
|
||||
l.Criticalf(format, args...)
|
||||
fmt.Println("Paniced")
|
||||
os.Exit(-1)
|
||||
}
|
26
go/pkg/errors/helper.go
Normal file
26
go/pkg/errors/helper.go
Normal file
|
@ -0,0 +1,26 @@
|
|||
package errors
|
||||
|
||||
import (
|
||||
"C"
|
||||
)
|
||||
import "fmt"
|
||||
|
||||
var (
|
||||
ErrEndOfFile = fmt.Errorf("end-of-file")
|
||||
)
|
||||
|
||||
func ErrorToInt(e error) int {
|
||||
if e == nil {
|
||||
return 0
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
func IntToError(ret int) error {
|
||||
if ret == 0 {
|
||||
return nil
|
||||
} else {
|
||||
return fmt.Errorf("ret=%d", ret)
|
||||
}
|
||||
}
|
215
go/pkg/node.go
215
go/pkg/node.go
|
@ -1,215 +0,0 @@
|
|||
package pkg
|
||||
|
||||
// #cgo LDFLAGS: -lvillas
|
||||
// #cgo CFLAGS: -DCGO
|
||||
// #include <villas/node.h>
|
||||
import "C"
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const MAX_SIGNALS = 64
|
||||
const NUM_HUGEPAGES = 100
|
||||
|
||||
func ret2err(ret C.int) error {
|
||||
if ret == 0 {
|
||||
return nil
|
||||
} else {
|
||||
return fmt.Errorf("ret=%d", ret)
|
||||
}
|
||||
}
|
||||
|
||||
type Sample struct {
|
||||
TimestampOrigin time.Time
|
||||
TimestampReceived time.Time
|
||||
Sequence uint
|
||||
Flags int
|
||||
Data []float64
|
||||
}
|
||||
|
||||
func (s *Sample) ToC() *C.vsample {
|
||||
return C.sample_pack(
|
||||
C.uint(s.Sequence),
|
||||
&C.struct_timespec{
|
||||
tv_sec: C.long(s.TimestampOrigin.Unix()),
|
||||
tv_nsec: C.long(s.TimestampOrigin.Nanosecond()),
|
||||
},
|
||||
&C.struct_timespec{
|
||||
tv_sec: C.long(s.TimestampReceived.Unix()),
|
||||
tv_nsec: C.long(s.TimestampReceived.Nanosecond()),
|
||||
},
|
||||
C.uint(len(s.Data)),
|
||||
(*C.double)(unsafe.Pointer(&s.Data[0])),
|
||||
)
|
||||
}
|
||||
|
||||
func (s *Sample) FromC(c *C.vsample) {
|
||||
var tsOrigin C.struct_timespec
|
||||
var tsReceived C.struct_timespec
|
||||
|
||||
len := C.sample_length(c)
|
||||
|
||||
s.Data = make([]float64, uint(len))
|
||||
|
||||
C.sample_unpack(c,
|
||||
(*C.uint)(unsafe.Pointer(&s.Sequence)),
|
||||
&tsOrigin,
|
||||
&tsReceived,
|
||||
(*C.int)(unsafe.Pointer(&s.Flags)),
|
||||
&len,
|
||||
(*C.double)(unsafe.Pointer(&s.Data[0])),
|
||||
)
|
||||
|
||||
s.TimestampOrigin = time.Unix(int64(tsOrigin.tv_sec), int64(tsOrigin.tv_nsec))
|
||||
s.TimestampReceived = time.Unix(int64(tsReceived.tv_sec), int64(tsReceived.tv_nsec))
|
||||
}
|
||||
|
||||
type Node struct {
|
||||
inst *C.vnode
|
||||
}
|
||||
|
||||
func IsValidNodeNname(name string) bool {
|
||||
return bool(C.node_is_valid_name(C.CString(name)))
|
||||
}
|
||||
|
||||
func NewNode(cfg interface{}, sn_uuid uuid.UUID) (*Node, error) {
|
||||
if js, err := json.Marshal(cfg); err != nil {
|
||||
return nil, fmt.Errorf("failed to serialize config: %w", err)
|
||||
} else {
|
||||
log.Printf("Config = %s\n", js)
|
||||
n := C.node_new(C.CString(string(js)), C.CString(sn_uuid.String()))
|
||||
return &Node{n}, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Node) Prepare() error {
|
||||
return ret2err(C.node_prepare(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Check() error {
|
||||
return ret2err(C.node_check(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Start() error {
|
||||
return ret2err(C.node_start(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Stop() error {
|
||||
return ret2err(C.node_stop(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Pause() error {
|
||||
return ret2err(C.node_pause(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Resume() error {
|
||||
return ret2err(C.node_resume(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Restart() error {
|
||||
return ret2err(C.node_restart(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Close() error {
|
||||
return ret2err(C.node_destroy(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Reverse() error {
|
||||
return ret2err(C.node_reverse(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Read(cnt int) []Sample {
|
||||
var csmps = make([]*C.vsample, cnt)
|
||||
|
||||
for i := 0; i < cnt; i++ {
|
||||
csmps[i] = C.sample_alloc(MAX_SIGNALS)
|
||||
}
|
||||
|
||||
read := int(C.node_read(n.inst, (**C.vsample)(unsafe.Pointer(&csmps[0])), C.uint(cnt)))
|
||||
|
||||
var smps = make([]Sample, read)
|
||||
for i := 0; i < read; i++ {
|
||||
smps[i].FromC(csmps[i])
|
||||
C.sample_decref(csmps[i])
|
||||
}
|
||||
|
||||
return smps
|
||||
}
|
||||
|
||||
func (n *Node) Write(smps []Sample) int {
|
||||
cnt := len(smps)
|
||||
var csmps = make([]*C.vsample, cnt)
|
||||
|
||||
for i := 0; i < cnt; i++ {
|
||||
csmps[i] = smps[i].ToC()
|
||||
}
|
||||
|
||||
return int(C.node_write(n.inst, (**C.vsample)(unsafe.Pointer(&csmps[0])), C.uint(cnt)))
|
||||
}
|
||||
|
||||
func (n *Node) PollFDs() []int {
|
||||
var cfds [16]C.int
|
||||
cnt := int(C.node_poll_fds(n.inst, (*C.int)(unsafe.Pointer(&cfds))))
|
||||
|
||||
var fds = make([]int, cnt)
|
||||
for i := 0; i < cnt; i++ {
|
||||
fds[i] = int(cfds[i])
|
||||
}
|
||||
|
||||
return fds
|
||||
}
|
||||
|
||||
func (n *Node) NetemFDs() []int {
|
||||
var cfds [16]C.int
|
||||
cnt := int(C.node_netem_fds(n.inst, (*C.int)(unsafe.Pointer(&cfds))))
|
||||
|
||||
var fds = make([]int, cnt)
|
||||
for i := 0; i < cnt; i++ {
|
||||
fds[i] = int(cfds[i])
|
||||
}
|
||||
|
||||
return fds
|
||||
}
|
||||
|
||||
func (n *Node) IsEnabled() bool {
|
||||
return bool(C.node_is_enabled(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Name() string {
|
||||
return C.GoString(C.node_name(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) NameShort() string {
|
||||
return C.GoString(C.node_name_short(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) NameFull() string {
|
||||
return C.GoString(C.node_name_full(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) Details() string {
|
||||
return C.GoString(C.node_details(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) InputSignalsMaxCount() uint {
|
||||
return uint(C.node_input_signals_max_cnt(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) OutputSignalsMaxCount() uint {
|
||||
return uint(C.node_output_signals_max_cnt(n.inst))
|
||||
}
|
||||
|
||||
func (n *Node) ToJSON() string {
|
||||
json_str := C.node_to_json_str(n.inst)
|
||||
return C.GoString(json_str)
|
||||
}
|
||||
|
||||
func init() {
|
||||
C.memory_init(NUM_HUGEPAGES)
|
||||
}
|
56
go/pkg/nodes/base.go
Normal file
56
go/pkg/nodes/base.go
Normal file
|
@ -0,0 +1,56 @@
|
|||
package nodes
|
||||
|
||||
type BaseNode struct {
|
||||
Node
|
||||
|
||||
Logger Logger
|
||||
|
||||
Stopped chan struct{}
|
||||
}
|
||||
|
||||
func NewBaseNode() BaseNode {
|
||||
return BaseNode{}
|
||||
}
|
||||
|
||||
func (n *BaseNode) Start() error {
|
||||
n.Stopped = make(chan struct{})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Stop() error {
|
||||
close(n.Stopped)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Parse(c []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Restart() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Pause() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Resume() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Reverse() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *BaseNode) SetLogger(l Logger) {
|
||||
n.Logger = l
|
||||
}
|
85
go/pkg/nodes/example/node.go
Normal file
85
go/pkg/nodes/example/node.go
Normal file
|
@ -0,0 +1,85 @@
|
|||
package nodes
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.rwth-aachen.de/acs/public/villas/node/go/pkg"
|
||||
"git.rwth-aachen.de/acs/public/villas/node/go/pkg/nodes"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
nodes.BaseNode
|
||||
|
||||
ticker time.Ticker
|
||||
|
||||
Config Config
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
nodes.NodeConfig
|
||||
|
||||
Value int `json:"value"`
|
||||
}
|
||||
|
||||
func NewNode() nodes.Node {
|
||||
return &Node{
|
||||
BaseNode: nodes.NewBaseNode(),
|
||||
ticker: *time.NewTicker(1 * time.Second),
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Node) Parse(c []byte) error {
|
||||
return json.Unmarshal(c, &n.Config)
|
||||
}
|
||||
|
||||
func (n *Node) Check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Prepare() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Start() error {
|
||||
n.Logger.Infof("hello from node")
|
||||
n.Logger.Warnf("hello from node")
|
||||
n.Logger.Errorf("hello from node")
|
||||
n.Logger.Tracef("hello from node")
|
||||
n.Logger.Criticalf("hello from node")
|
||||
|
||||
return n.BaseNode.Start()
|
||||
}
|
||||
|
||||
func (n *Node) Read() ([]byte, error) {
|
||||
select {
|
||||
case <-n.ticker.C:
|
||||
return pkg.GenerateRandomSample().Bytes(), nil
|
||||
case <-n.Stopped:
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Node) Write(data []byte) error {
|
||||
n.Logger.Infof("Data: %s", string(data))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) PollFDs() ([]int, error) {
|
||||
return []int{}, nil
|
||||
}
|
||||
|
||||
func (n *Node) NetemFDs() ([]int, error) {
|
||||
return []int{}, nil
|
||||
}
|
||||
|
||||
func (n *Node) Details() string {
|
||||
return fmt.Sprintf("value=%d", n.Config.Value)
|
||||
}
|
||||
|
||||
func init() {
|
||||
// Do not forget to import the package in go/lib/main.go!
|
||||
nodes.RegisterNodeType("go.example", "A example node implemented in Go", NewNode, nodes.NodeSupportsRead|nodes.NodeSupportsWrite|nodes.NodeHidden)
|
||||
}
|
18
go/pkg/nodes/logger.go
Normal file
18
go/pkg/nodes/logger.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package nodes
|
||||
|
||||
type Logger interface {
|
||||
Trace(msg string)
|
||||
Debug(msg string)
|
||||
Info(msg string)
|
||||
Warn(msg string)
|
||||
Error(msg string)
|
||||
Critical(msg string)
|
||||
Tracef(format string, args ...interface{})
|
||||
Debugf(format string, args ...interface{})
|
||||
Infof(format string, args ...interface{})
|
||||
Warnf(format string, args ...interface{})
|
||||
Errorf(format string, args ...interface{})
|
||||
Criticalf(format string, args ...interface{})
|
||||
Panic(msg string)
|
||||
Panicf(format string, args ...interface{})
|
||||
}
|
77
go/pkg/nodes/loopback/node.go
Normal file
77
go/pkg/nodes/loopback/node.go
Normal file
|
@ -0,0 +1,77 @@
|
|||
package nodes
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"git.rwth-aachen.de/acs/public/villas/node/go/pkg/errors"
|
||||
"git.rwth-aachen.de/acs/public/villas/node/go/pkg/nodes"
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
nodes.BaseNode
|
||||
|
||||
channel chan []byte
|
||||
|
||||
Config LoopbackConfig
|
||||
}
|
||||
|
||||
type LoopbackConfig struct {
|
||||
nodes.NodeConfig
|
||||
|
||||
Value int `json:"value"`
|
||||
}
|
||||
|
||||
func NewNode() nodes.Node {
|
||||
return &Node{
|
||||
BaseNode: nodes.NewBaseNode(),
|
||||
channel: make(chan []byte, 1024),
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Node) Parse(c []byte) error {
|
||||
return json.Unmarshal(c, &n.Config)
|
||||
}
|
||||
|
||||
func (n *Node) Check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Prepare() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Start() error {
|
||||
return n.BaseNode.Start()
|
||||
}
|
||||
|
||||
func (n *Node) Read() ([]byte, error) {
|
||||
select {
|
||||
case buf := <-n.channel:
|
||||
return buf, nil
|
||||
case <-n.Stopped:
|
||||
return nil, errors.ErrEndOfFile
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Node) Write(data []byte) error {
|
||||
n.channel <- data
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) PollFDs() ([]int, error) {
|
||||
return []int{}, nil
|
||||
}
|
||||
|
||||
func (n *Node) NetemFDs() ([]int, error) {
|
||||
return []int{}, nil
|
||||
}
|
||||
|
||||
func (n *Node) Details() string {
|
||||
return fmt.Sprintf("value=%d", n.Config.Value)
|
||||
}
|
||||
|
||||
func init() {
|
||||
nodes.RegisterNodeType("go.loopback", "A loopback node implmented in Go", NewNode, nodes.NodeSupportsRead|nodes.NodeSupportsWrite|nodes.NodeHidden)
|
||||
}
|
|
@ -1,6 +1,16 @@
|
|||
package node
|
||||
package nodes
|
||||
|
||||
type NodeCtor func() Node
|
||||
const (
|
||||
NodeSupportsPoll = (1 << iota)
|
||||
NodeSupportsRead = (1 << iota)
|
||||
NodeSupportsWrite = (1 << iota)
|
||||
NodeRequiresWeb = (1 << iota)
|
||||
NodeProvidesSignals = (1 << iota)
|
||||
NodeInternal = (1 << iota)
|
||||
NodeHidden = (1 << iota)
|
||||
)
|
||||
|
||||
type NodeConstructor func() Node
|
||||
|
||||
type Node interface {
|
||||
Close() error
|
||||
|
@ -23,12 +33,12 @@ type Node interface {
|
|||
|
||||
Reverse() error
|
||||
|
||||
GetPollFDs() ([]int, error)
|
||||
GetNetemFDs() ([]int, error)
|
||||
|
||||
// GetMemoryType()
|
||||
PollFDs() ([]int, error)
|
||||
NetemFDs() ([]int, error)
|
||||
|
||||
Details() string
|
||||
|
||||
SetLogger(l Logger)
|
||||
}
|
||||
|
||||
type NodeConfig struct {
|
23
go/pkg/nodes/registry.go
Normal file
23
go/pkg/nodes/registry.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package nodes
|
||||
|
||||
var (
|
||||
goNodeTypes = map[string]NodeType{}
|
||||
)
|
||||
|
||||
type NodeType struct {
|
||||
Constructor NodeConstructor
|
||||
Flags int
|
||||
Description string
|
||||
}
|
||||
|
||||
func RegisterNodeType(name string, desc string, ctor NodeConstructor, flags int) {
|
||||
goNodeTypes[name] = NodeType{
|
||||
Constructor: ctor,
|
||||
Flags: flags,
|
||||
Description: desc,
|
||||
}
|
||||
}
|
||||
|
||||
func NodeTypes() map[string]NodeType {
|
||||
return goNodeTypes
|
||||
}
|
45
go/pkg/sample.go
Normal file
45
go/pkg/sample.go
Normal file
|
@ -0,0 +1,45 @@
|
|||
package pkg
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Timestamp [2]int64
|
||||
|
||||
func TimestampFromTime(t time.Time) Timestamp {
|
||||
return Timestamp{t.Unix(), int64(t.Nanosecond())}
|
||||
}
|
||||
|
||||
type Timestamps struct {
|
||||
Origin Timestamp `json:"origin"`
|
||||
Received Timestamp `json:"received"`
|
||||
}
|
||||
|
||||
type Sample struct {
|
||||
Timestamps Timestamps `json:"ts"`
|
||||
Sequence uint64 `json:"sequence"`
|
||||
Data []float64 `json:"data"`
|
||||
}
|
||||
|
||||
func GenerateRandomSample() Sample {
|
||||
now := time.Now()
|
||||
|
||||
return Sample{
|
||||
Timestamps: Timestamps{
|
||||
Origin: TimestampFromTime(now),
|
||||
},
|
||||
Sequence: 1,
|
||||
Data: []float64{
|
||||
1 * rand.Float64(),
|
||||
10 * rand.Float64(),
|
||||
100 * rand.Float64(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (s Sample) Bytes() []byte {
|
||||
b, _ := json.Marshal(s)
|
||||
return b
|
||||
}
|
12
include/villas/nodes/go.h
Normal file
12
include/villas/nodes/go.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
typedef void *_go_plugin;
|
||||
typedef void *_go_plugin_list;
|
||||
typedef void *_go_logger;
|
||||
|
||||
typedef void (*_go_register_node_factory_cb)(_go_plugin_list pl, char *name, char *desc, int flags);
|
||||
typedef void (*_go_logger_log_cb)(_go_logger l, int level, char *msg);
|
||||
|
||||
_go_logger * _go_logger_get(char *name);
|
||||
|
||||
void _go_logger_log(_go_logger *l, int level, char *msg);
|
|
@ -31,11 +31,14 @@ namespace node {
|
|||
/* Forward declarations */
|
||||
struct Sample;
|
||||
class Format;
|
||||
class GoNodeFactory;
|
||||
|
||||
class GoNode : public Node {
|
||||
|
||||
friend GoNodeFactory;
|
||||
|
||||
protected:
|
||||
void *node;
|
||||
uintptr_t node; // runtime/cgo.Handle
|
||||
|
||||
std::string _details;
|
||||
|
||||
|
@ -48,7 +51,7 @@ protected:
|
|||
int _write(struct Sample * smps[], unsigned cnt);
|
||||
|
||||
public:
|
||||
GoNode(void *n);
|
||||
GoNode(uintptr_t n);
|
||||
|
||||
virtual
|
||||
~GoNode();
|
||||
|
@ -84,41 +87,47 @@ public:
|
|||
int resume();
|
||||
|
||||
virtual
|
||||
int restart()
|
||||
{
|
||||
assert(state == State::STARTED);
|
||||
|
||||
logger->info("Restarting node");
|
||||
|
||||
return GoNodeRestart(node);
|
||||
}
|
||||
int restart();
|
||||
|
||||
virtual
|
||||
int reverse()
|
||||
{
|
||||
return GoNodeReverse(node);
|
||||
}
|
||||
int reverse();
|
||||
};
|
||||
|
||||
class GoNodeFactory : public NodeFactory {
|
||||
|
||||
protected:
|
||||
std::string type;
|
||||
std::string name;
|
||||
std::string description;
|
||||
int flags;
|
||||
|
||||
public:
|
||||
GoNodeFactory(char *t) :
|
||||
GoNodeFactory(char *n, char *d, int f = 0) :
|
||||
NodeFactory(),
|
||||
type(t)
|
||||
name(n),
|
||||
description(d),
|
||||
flags(f)
|
||||
{ }
|
||||
|
||||
virtual
|
||||
Node * make();
|
||||
|
||||
virtual
|
||||
std::string getName() const;
|
||||
std::string getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
virtual
|
||||
std::string getDescription() const;
|
||||
std::string getDescription() const
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
virtual
|
||||
int getFlags() const
|
||||
{
|
||||
return flags;
|
||||
}
|
||||
};
|
||||
|
||||
class GoPluginRegistry : public plugin::SubRegistry {
|
||||
|
|
|
@ -274,10 +274,14 @@ int Node::stop()
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (state != State::STOPPING && state != State::STARTED && state != State::CONNECTED && state != State::PENDING_CONNECT)
|
||||
if (state != State::STOPPING &&
|
||||
state != State::STARTED &&
|
||||
state != State::CONNECTED &&
|
||||
state != State::PENDING_CONNECT)
|
||||
return 0;
|
||||
|
||||
logger->info("Stopping node");
|
||||
setState(State::STOPPING);
|
||||
|
||||
ret = in.stop();
|
||||
if (ret)
|
||||
|
|
|
@ -24,6 +24,12 @@ set(NODE_SRC
|
|||
loopback_internal.cpp
|
||||
)
|
||||
|
||||
# Enable Golang support
|
||||
if(WITH_NODE_GO)
|
||||
list(APPEND NODE_SRC go.cpp)
|
||||
list(APPEND LIBRARIES villas-go)
|
||||
endif()
|
||||
|
||||
if(LIBNL3_ROUTE_FOUND)
|
||||
list(APPEND LIBRARIES PkgConfig::LIBNL3_ROUTE)
|
||||
endif()
|
||||
|
@ -60,12 +66,6 @@ if(WITH_NODE_EXEC)
|
|||
list(APPEND NODE_SRC exec.cpp)
|
||||
endif()
|
||||
|
||||
if(WITH_NODE_GO)
|
||||
add_subdirectory(go)
|
||||
list(APPEND LIBRARIES nodes-go)
|
||||
list(APPEND NODE_SRC go.cpp)
|
||||
endif()
|
||||
|
||||
# Enable Universal Library for Linux DAQ devices (libuldaq)
|
||||
if(WITH_NODE_ULDAQ)
|
||||
list(APPEND NODE_SRC uldaq.cpp)
|
||||
|
@ -194,3 +194,9 @@ endif()
|
|||
add_library(nodes STATIC ${NODE_SRC})
|
||||
target_include_directories(nodes PUBLIC ${INCLUDE_DIRS})
|
||||
target_link_libraries(nodes PUBLIC ${LIBRARIES})
|
||||
|
||||
if(WITH_NODE_GO)
|
||||
add_dependencies(nodes villas-go-header)
|
||||
target_include_directories(nodes PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/../../go/lib)
|
||||
target_link_libraries(nodes PUBLIC villas-go)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/** Node-type implemeted in Go language
|
||||
*
|
||||
* @file
|
||||
|
@ -21,19 +22,36 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************************/
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#include <libnodes-go.h>
|
||||
}
|
||||
|
||||
#include <villas/nodes/go.hpp>
|
||||
#include <villas/plugin.hpp>
|
||||
#include <villas/format.hpp>
|
||||
|
||||
extern "C" {
|
||||
#include <libvillas-go.h>
|
||||
#include <villas/nodes/go.h>
|
||||
}
|
||||
|
||||
using namespace villas;
|
||||
using namespace villas::node;
|
||||
|
||||
GoNode::GoNode(void *n) :
|
||||
void _go_register_node_factory(_go_plugin_list pl, char *name, char *desc, int flags)
|
||||
{
|
||||
auto *plugins = (villas::plugin::List<> *) pl;
|
||||
plugins->push_back(new villas::node::GoNodeFactory(name, desc, flags));
|
||||
}
|
||||
|
||||
_go_logger * _go_logger_get(char *name)
|
||||
{
|
||||
return (_go_logger *) villas::logging.get(name).get();
|
||||
}
|
||||
|
||||
void _go_logger_log(_go_logger l, int level, char *msg)
|
||||
{
|
||||
auto *log = (spdlog::logger *) l;
|
||||
log->log((spdlog::level::level_enum) level, "{}", msg);
|
||||
}
|
||||
|
||||
GoNode::GoNode(uintptr_t n) :
|
||||
Node(),
|
||||
node(n)
|
||||
{ }
|
||||
|
@ -49,6 +67,8 @@ int GoNode::parse(json_t *json, const uuid_t sn_uuid)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
GoNodeSetLogger(node, _go_logger_log, logger.get());
|
||||
|
||||
json_t *json_format = nullptr;
|
||||
json_error_t err;
|
||||
|
||||
|
@ -116,13 +136,13 @@ int GoNode::stop() {
|
|||
state == State::PAUSED ||
|
||||
state == State::STOPPING);
|
||||
|
||||
ret = GoNodeStop(node);
|
||||
ret = Node::stop();
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = Node::stop();
|
||||
if (!ret)
|
||||
state = State::STOPPED;
|
||||
ret = GoNodeStop(node);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -195,17 +215,18 @@ std::vector<int> GoNode::getNetemFDs()
|
|||
int GoNode::_read(struct Sample * smps[], unsigned cnt)
|
||||
{
|
||||
int ret;
|
||||
char buf[4096];
|
||||
size_t rbytes;
|
||||
|
||||
auto d = GoNodeRead(node);
|
||||
auto d = GoNodeRead(node, buf, 4096);
|
||||
if (d.r1)
|
||||
return d.r1;
|
||||
|
||||
ret = formatter->sscan((const char*) d.r0.data, d.r0.len, &rbytes, smps, cnt);
|
||||
if (ret < 0 || (size_t) d.r0.len != rbytes)
|
||||
logger->warn("Received invalid packet: ret={}, bytes={}, rbytes={}", ret, d.r0.len, rbytes);
|
||||
|
||||
logger->info("Received {} bytes: {}", d.r0.len, (char *) d.r0.data);
|
||||
ret = formatter->sscan(buf, d.r0, &rbytes, smps, cnt);
|
||||
if (ret < 0 || (size_t) d.r0 != rbytes) {
|
||||
logger->warn("Received invalid packet: ret={}, bytes={}, rbytes={}", ret, d.r0, rbytes);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -233,9 +254,24 @@ int GoNode::_write(struct Sample * smps[], unsigned cnt)
|
|||
return cnt;
|
||||
}
|
||||
|
||||
int GoNode::restart()
|
||||
{
|
||||
assert(state == State::STARTED);
|
||||
|
||||
logger->info("Restarting node");
|
||||
|
||||
return GoNodeRestart(node);
|
||||
}
|
||||
|
||||
int GoNode::reverse()
|
||||
{
|
||||
return GoNodeReverse(node);
|
||||
}
|
||||
|
||||
|
||||
Node * GoNodeFactory::make()
|
||||
{
|
||||
auto *nt = NewGoNode((char *) type.c_str());
|
||||
auto nt = NewGoNode((char *) name.c_str());
|
||||
if (!nt)
|
||||
return nullptr;
|
||||
|
||||
|
@ -243,19 +279,11 @@ Node * GoNodeFactory::make()
|
|||
|
||||
init(n);
|
||||
|
||||
GoNodeSetLogger(n->node, _go_logger_log, n->logger.get());
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
std::string GoNodeFactory::getName() const
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
std::string GoNodeFactory::getDescription() const
|
||||
{
|
||||
return "Go-based node-type";
|
||||
}
|
||||
|
||||
GoPluginRegistry::GoPluginRegistry() {
|
||||
if (plugin::registry == nullptr)
|
||||
plugin::registry = new plugin::Registry();
|
||||
|
@ -267,15 +295,7 @@ villas::plugin::List<> GoPluginRegistry::lookup()
|
|||
{
|
||||
plugin::List<> plugins;
|
||||
|
||||
auto nt = GoNodeTypes();
|
||||
auto ntl = std::vector<char*>(nt.r1, nt.r1+nt.r0);
|
||||
|
||||
for (auto nt : ntl) {
|
||||
plugins.push_back(new GoNodeFactory(nt));
|
||||
free(nt);
|
||||
}
|
||||
|
||||
free(nt.r1);
|
||||
RegisterGoNodeTypes(_go_register_node_factory, &plugins);
|
||||
|
||||
return plugins;
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
set(LIB libnodes-go.a)
|
||||
file(GLOB_RECURSE SRCS *.go)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LIB}
|
||||
DEPENDS ${SRCS}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND env CGO_ENABLED=1 GOPATH=${GOPATH} go build -buildmode=c-archive -o "${CMAKE_CURRENT_BINARY_DIR}/${LIB}" ${CMAKE_GO_FLAGS} .
|
||||
COMMENT "Building Go library ${LIB}")
|
||||
|
||||
add_custom_target(libvillas-go DEPENDS ${LIB} ${HEADER})
|
||||
|
||||
add_library(nodes-go STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(nodes-go libvillas-go)
|
||||
set_target_properties(nodes-go
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/${LIB}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
|
@ -1,10 +0,0 @@
|
|||
module git.rwth-aachen.de/acs/public/villas/node
|
||||
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/gorilla/websocket v1.5.0 // indirect
|
||||
github.com/mattn/go-pointer v0.0.1
|
||||
github.com/pion/webrtc/v3 v3.1.24 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
)
|
|
@ -1,154 +0,0 @@
|
|||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
|
||||
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
|
||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
||||
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
|
||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
||||
github.com/pion/datachannel v1.5.2 h1:piB93s8LGmbECrpO84DnkIVWasRMk3IimbcXkTQLE6E=
|
||||
github.com/pion/datachannel v1.5.2/go.mod h1:FTGQWaHrdCwIJ1rw6xBIfZVkslikjShim5yr05XFuCQ=
|
||||
github.com/pion/dtls/v2 v2.1.2/go.mod h1:o6+WvyLDAlXF7YiPB/RlskRoeK+/JtuaZa5emwQcWus=
|
||||
github.com/pion/dtls/v2 v2.1.3 h1:3UF7udADqous+M2R5Uo2q/YaP4EzUoWKdfX2oscCUio=
|
||||
github.com/pion/dtls/v2 v2.1.3/go.mod h1:o6+WvyLDAlXF7YiPB/RlskRoeK+/JtuaZa5emwQcWus=
|
||||
github.com/pion/ice/v2 v2.2.1 h1:R3MeuJZpU1ty3diPqpD5OxaxcZ15eprAc+EtUiSoFxg=
|
||||
github.com/pion/ice/v2 v2.2.1/go.mod h1:Op8jlPtjeiycsXh93Cs4jK82C9j/kh7vef6ztIOvtIQ=
|
||||
github.com/pion/interceptor v0.1.7 h1:HThW0tIIKT9RRoDWGURe8rlZVOx0fJHxBHpA0ej0+bo=
|
||||
github.com/pion/interceptor v0.1.7/go.mod h1:Lh3JSl/cbJ2wP8I3ccrjh1K/deRGRn3UlSPuOTiHb6U=
|
||||
github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
|
||||
github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms=
|
||||
github.com/pion/mdns v0.0.5 h1:Q2oj/JB3NqfzY9xGZ1fPzZzK7sDSD8rZPOvcIQ10BCw=
|
||||
github.com/pion/mdns v0.0.5/go.mod h1:UgssrvdD3mxpi8tMxAXbsppL3vJ4Jipw1mTCW+al01g=
|
||||
github.com/pion/randutil v0.1.0 h1:CFG1UdESneORglEsnimhUjf33Rwjubwj6xfiOXBa3mA=
|
||||
github.com/pion/randutil v0.1.0/go.mod h1:XcJrSMMbbMRhASFVOlj/5hQial/Y8oH/HVo7TBZq+j8=
|
||||
github.com/pion/rtcp v1.2.6/go.mod h1:52rMNPWFsjr39z9B9MhnkqhPLoeHTv1aN63o/42bWE0=
|
||||
github.com/pion/rtcp v1.2.9 h1:1ujStwg++IOLIEoOiIQ2s+qBuJ1VN81KW+9pMPsif+U=
|
||||
github.com/pion/rtcp v1.2.9/go.mod h1:qVPhiCzAm4D/rxb6XzKeyZiQK69yJpbUDJSF7TgrqNo=
|
||||
github.com/pion/rtp v1.7.0/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/rtp v1.7.4 h1:4dMbjb1SuynU5OpA3kz1zHK+u+eOCQjW3MAeVHf1ODA=
|
||||
github.com/pion/rtp v1.7.4/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
|
||||
github.com/pion/sctp v1.8.0/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
|
||||
github.com/pion/sctp v1.8.2 h1:yBBCIrUMJ4yFICL3RIvR4eh/H2BTTvlligmSTy+3kiA=
|
||||
github.com/pion/sctp v1.8.2/go.mod h1:xFe9cLMZ5Vj6eOzpyiKjT9SwGM4KpK/8Jbw5//jc+0s=
|
||||
github.com/pion/sdp/v3 v3.0.4 h1:2Kf+dgrzJflNCSw3TV5v2VLeI0s/qkzy2r5jlR0wzf8=
|
||||
github.com/pion/sdp/v3 v3.0.4/go.mod h1:bNiSknmJE0HYBprTHXKPQ3+JjacTv5uap92ueJZKsRk=
|
||||
github.com/pion/srtp/v2 v2.0.5 h1:ks3wcTvIUE/GHndO3FAvROQ9opy0uLELpwHJaQ1yqhQ=
|
||||
github.com/pion/srtp/v2 v2.0.5/go.mod h1:8k6AJlal740mrZ6WYxc4Dg6qDqqhxoRG2GSjlUhDF0A=
|
||||
github.com/pion/stun v0.3.5 h1:uLUCBCkQby4S1cf6CGuR9QrVOKcvUwFeemaC865QHDg=
|
||||
github.com/pion/stun v0.3.5/go.mod h1:gDMim+47EeEtfWogA37n6qXZS88L5V6LqFcf+DZA2UA=
|
||||
github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
|
||||
github.com/pion/transport v0.12.3/go.mod h1:OViWW9SP2peE/HbwBvARicmAVnesphkNkCVZIWJ6q9A=
|
||||
github.com/pion/transport v0.13.0 h1:KWTA5ZrQogizzYwPEciGtHPLwpAjE91FgXnyu+Hv2uY=
|
||||
github.com/pion/transport v0.13.0/go.mod h1:yxm9uXpK9bpBBWkITk13cLo1y5/ur5VQpG22ny6EP7g=
|
||||
github.com/pion/turn/v2 v2.0.8 h1:KEstL92OUN3k5k8qxsXHpr7WWfrdp7iJZHx99ud8muw=
|
||||
github.com/pion/turn/v2 v2.0.8/go.mod h1:+y7xl719J8bAEVpSXBXvTxStjJv3hbz9YFflvkpcGPw=
|
||||
github.com/pion/udp v0.1.1 h1:8UAPvyqmsxK8oOjloDk4wUt63TzFe9WEJkg5lChlj7o=
|
||||
github.com/pion/udp v0.1.1/go.mod h1:6AFo+CMdKQm7UiA0eUPA8/eVCTx8jBIITLZHc9DWX5M=
|
||||
github.com/pion/webrtc/v3 v3.1.24 h1:s9PuwisrgHe1FTqfwK4p3T7rXtAHaUNhycbdMjADT28=
|
||||
github.com/pion/webrtc/v3 v3.1.24/go.mod h1:mO/yv7fBN3Lp7YNlnYcTj1jtpvNvssJG+7eh6itZ4xM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE=
|
||||
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20211201190559-0a0e4e1bb54c/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk=
|
||||
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
|
||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
@ -1,13 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"C"
|
||||
)
|
||||
|
||||
func errorToInt(e error) C.int {
|
||||
if e == nil {
|
||||
return 0
|
||||
} else {
|
||||
return -1
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
#include <villas/log.hpp>
|
||||
|
||||
extern "C" {
|
||||
#include "log.h"
|
||||
}
|
||||
|
||||
using namespace villas;
|
||||
|
||||
void log(char *logger, int level, char *msg);
|
||||
{
|
||||
auto logger = logging.get(logger);
|
||||
|
||||
spdlog::log(level, "{}", msg);
|
||||
|
||||
free(logger);
|
||||
free(msg);
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
void log(char *logger, int level, char *msg);
|
|
@ -1,81 +0,0 @@
|
|||
package main
|
||||
|
||||
//// #include "log.h"
|
||||
import "C"
|
||||
import "fmt"
|
||||
|
||||
type LogLevel int
|
||||
|
||||
const (
|
||||
// https://github.com/gabime/spdlog/blob/a51b4856377a71f81b6d74b9af459305c4c644f8/include/spdlog/common.h#L76
|
||||
LogLevelTrace LogLevel = iota
|
||||
LogLevelDebug LogLevel = iota
|
||||
LogLevelInfo LogLevel = iota
|
||||
LogLevelWarn LogLevel = iota
|
||||
LogLevelError LogLevel = iota
|
||||
LogLevelCritical LogLevel = iota
|
||||
LogLevelOff LogLevel = iota
|
||||
)
|
||||
|
||||
type Logger struct {
|
||||
Name string
|
||||
|
||||
cName *C.char
|
||||
}
|
||||
|
||||
func GetLogger(name string) *Logger {
|
||||
return &Logger{
|
||||
Name: name,
|
||||
}
|
||||
}
|
||||
|
||||
func (l *Logger) log(lvl LogLevel, msg string) {
|
||||
cMsg := C.CString(msg)
|
||||
C.log(l.cName, lvl, cMsg)
|
||||
C.free(cMsg)
|
||||
}
|
||||
|
||||
func (l *Logger) Trace(msg string) {
|
||||
l.log(LogLevelTrace, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Info(msg string) {
|
||||
l.log(LogLevelInfo, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Warn(msg string) {
|
||||
l.log(LogLevelWarn, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Error(msg string) {
|
||||
l.log(LogLevelError, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Critical(msg string) {
|
||||
l.log(LogLevelCritical, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Tracef(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelTrace, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Infof(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelInfo, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Warnf(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelWarn, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Errorf(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelError, msg)
|
||||
}
|
||||
|
||||
func (l *Logger) Criticalf(format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
l.log(LogLevelCritical, msg)
|
||||
}
|
|
@ -1,160 +0,0 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
node "git.rwth-aachen.de/acs/public/villas/node/pkg"
|
||||
gopointer "github.com/mattn/go-pointer"
|
||||
|
||||
_ "git.rwth-aachen.de/acs/public/villas/node/pkg/nodes/loopback"
|
||||
_ "git.rwth-aachen.de/acs/public/villas/node/pkg/nodes/webrtc"
|
||||
)
|
||||
|
||||
func main() {}
|
||||
|
||||
//export GoNodeTypes
|
||||
func GoNodeTypes() (int, **C.char) {
|
||||
var nodeTypes = node.NodeTypes()
|
||||
var n = len(nodeTypes)
|
||||
|
||||
types := (**C.char)(C.malloc(C.size_t(n) * C.size_t(unsafe.Sizeof(uintptr(0)))))
|
||||
slice := (*[1 << 31]*C.char)(unsafe.Pointer(types))[:n:n]
|
||||
|
||||
i := 0
|
||||
for typ, _ := range nodeTypes {
|
||||
slice[i] = C.CString(typ)
|
||||
i++
|
||||
}
|
||||
|
||||
return n, types
|
||||
}
|
||||
|
||||
//export NewGoNode
|
||||
func NewGoNode(t *C.char) unsafe.Pointer {
|
||||
var nodeTypes = node.NodeTypes()
|
||||
|
||||
typ := C.GoString(t)
|
||||
ctor, ok := nodeTypes[typ]
|
||||
if !ok {
|
||||
return unsafe.Pointer(nil)
|
||||
}
|
||||
|
||||
node := ctor()
|
||||
|
||||
ptr := gopointer.Save(node)
|
||||
return ptr
|
||||
}
|
||||
|
||||
//export GoNodeClose
|
||||
func GoNodeClose(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Close())
|
||||
}
|
||||
|
||||
//export GoNodePrepare
|
||||
func GoNodePrepare(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Prepare())
|
||||
}
|
||||
|
||||
//export GoNodeParse
|
||||
func GoNodeParse(p unsafe.Pointer, c *C.char) C.int {
|
||||
scfg := C.GoString(c)
|
||||
bcfg := []byte(scfg)
|
||||
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Parse(bcfg))
|
||||
}
|
||||
|
||||
//export GoNodeCheck
|
||||
func GoNodeCheck(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Check())
|
||||
}
|
||||
|
||||
//export GoNodeStart
|
||||
func GoNodeStart(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Start())
|
||||
}
|
||||
|
||||
//export GoNodeStop
|
||||
func GoNodeStop(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Stop())
|
||||
}
|
||||
|
||||
//export GoNodePause
|
||||
func GoNodePause(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Pause())
|
||||
}
|
||||
|
||||
//export GoNodeResume
|
||||
func GoNodeResume(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Resume())
|
||||
}
|
||||
|
||||
//export GoNodeRestart
|
||||
func GoNodeRestart(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Restart())
|
||||
}
|
||||
|
||||
//export GoNodeRead
|
||||
func GoNodeRead(p unsafe.Pointer) ([]byte, C.int) {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
|
||||
d, err := n.Read()
|
||||
if err != nil {
|
||||
return nil, errorToInt(err)
|
||||
}
|
||||
|
||||
return d, 0
|
||||
}
|
||||
|
||||
//export GoNodeWrite
|
||||
func GoNodeWrite(p unsafe.Pointer, data []byte) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Write(data))
|
||||
}
|
||||
|
||||
//export GoNodeReverse
|
||||
func GoNodeReverse(p unsafe.Pointer) C.int {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
return errorToInt(n.Reverse())
|
||||
}
|
||||
|
||||
//export GoNodeGetPollFDs
|
||||
func GoNodeGetPollFDs(p unsafe.Pointer) ([]int, C.int) {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
f, err := n.GetPollFDs()
|
||||
if err != nil {
|
||||
return nil, errorToInt(err)
|
||||
}
|
||||
|
||||
return f, 0
|
||||
}
|
||||
|
||||
//export GoNodeGetNetemFDs
|
||||
func GoNodeGetNetemFDs(p unsafe.Pointer) ([]int, C.int) {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
f, err := n.GetNetemFDs()
|
||||
if err != nil {
|
||||
return nil, errorToInt(err)
|
||||
}
|
||||
|
||||
return f, 0
|
||||
}
|
||||
|
||||
//export GoNodeDetails
|
||||
func GoNodeDetails(p unsafe.Pointer) *C.char {
|
||||
n := gopointer.Restore(p).(node.Node)
|
||||
d := n.Details()
|
||||
return C.CString(d)
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
package nodes
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
node "git.rwth-aachen.de/acs/public/villas/node/pkg"
|
||||
)
|
||||
|
||||
type LoopbackNode struct {
|
||||
node.Node
|
||||
|
||||
channel chan []byte
|
||||
|
||||
Config LoopbackConfig
|
||||
}
|
||||
|
||||
type LoopbackConfig struct {
|
||||
node.NodeConfig
|
||||
|
||||
Value int `json:"value"`
|
||||
}
|
||||
|
||||
func NewLoopbackNode() node.Node {
|
||||
return &LoopbackNode{
|
||||
channel: make(chan []byte, 1024),
|
||||
}
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Parse(c []byte) error {
|
||||
return json.Unmarshal(c, &n.Config)
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Prepare() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Stop() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Read() ([]byte, error) {
|
||||
return <-n.channel, nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Write(data []byte) error {
|
||||
n.channel <- data
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) PollFDs() []int {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) NetemFDs() []int {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *LoopbackNode) Details() string {
|
||||
return fmt.Sprintf("value=%d", n.Config.Value)
|
||||
}
|
||||
|
||||
func init() {
|
||||
node.RegisterNode("go.loopback", NewLoopbackNode)
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
package webrtc
|
||||
|
||||
import "time"
|
||||
|
||||
var (
|
||||
DefaultExponentialBackoff = ExponentialBackoff{
|
||||
Factor: 1.5,
|
||||
Maximum: 1 * time.Minute,
|
||||
Initial: 1 * time.Second,
|
||||
Duration: 1 * time.Second,
|
||||
}
|
||||
)
|
||||
|
||||
type ExponentialBackoff struct {
|
||||
Factor float32
|
||||
Maximum time.Duration
|
||||
Initial time.Duration
|
||||
|
||||
Duration time.Duration
|
||||
}
|
||||
|
||||
func (e *ExponentialBackoff) Next() time.Duration {
|
||||
e.Duration = time.Duration(1.5 * float32(e.Duration)).Round(time.Second)
|
||||
if e.Duration > e.Maximum {
|
||||
e.Duration = e.Maximum
|
||||
}
|
||||
|
||||
return e.Duration
|
||||
}
|
||||
|
||||
func (e *ExponentialBackoff) Reset() {
|
||||
e.Duration = e.Initial
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
package webrtc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type SignalingClient struct {
|
||||
*websocket.Conn
|
||||
|
||||
URL *url.URL
|
||||
|
||||
done chan struct{}
|
||||
|
||||
isClosing bool
|
||||
backoff ExponentialBackoff
|
||||
|
||||
messageCallbacks []func(msg *SignalingMessage)
|
||||
connectCallbacks []func()
|
||||
disconnectCallbacks []func()
|
||||
}
|
||||
|
||||
func NewSignalingClient(u *url.URL) (*SignalingClient, error) {
|
||||
c := &SignalingClient{
|
||||
messageCallbacks: []func(msg *SignalingMessage){},
|
||||
connectCallbacks: []func(){},
|
||||
disconnectCallbacks: []func(){},
|
||||
isClosing: false,
|
||||
backoff: DefaultExponentialBackoff,
|
||||
URL: u,
|
||||
}
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func (c *SignalingClient) OnConnect(cb func()) {
|
||||
c.connectCallbacks = append(c.connectCallbacks, cb)
|
||||
}
|
||||
|
||||
func (c *SignalingClient) OnDisconnect(cb func()) {
|
||||
c.disconnectCallbacks = append(c.connectCallbacks, cb)
|
||||
}
|
||||
|
||||
func (c *SignalingClient) OnMessage(cb func(msg *SignalingMessage)) {
|
||||
c.messageCallbacks = append(c.messageCallbacks, cb)
|
||||
}
|
||||
|
||||
func (c *SignalingClient) SendSignalingMessage(msg *SignalingMessage) error {
|
||||
logrus.Infof("Sending signaling message: %s", msg)
|
||||
return c.Conn.WriteJSON(msg)
|
||||
}
|
||||
|
||||
func (c *SignalingClient) Close() error {
|
||||
// Return immediatly if there is no open connection
|
||||
if c.Conn == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
c.isClosing = true
|
||||
|
||||
// Cleanly close the connection by sending a close message and then
|
||||
// waiting (with timeout) for the server to close the connection.
|
||||
err := c.Conn.WriteControl(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""), time.Now().Add(5*time.Second))
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to send close message: %s", err)
|
||||
}
|
||||
|
||||
select {
|
||||
case <-c.done:
|
||||
logrus.Infof("Connection closed")
|
||||
case <-time.After(3 * time.Second):
|
||||
logrus.Warn("Timed-out waiting for connection close")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *SignalingClient) Connect() error {
|
||||
var err error
|
||||
|
||||
dialer := websocket.Dialer{
|
||||
HandshakeTimeout: 1 * time.Second,
|
||||
}
|
||||
|
||||
c.Conn, _, err = dialer.Dial(c.URL.String(), nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to dial %s: %w", c.URL, err)
|
||||
}
|
||||
|
||||
for _, cb := range c.connectCallbacks {
|
||||
cb()
|
||||
}
|
||||
|
||||
go c.read()
|
||||
|
||||
// Reset reconnect timer
|
||||
c.backoff.Reset()
|
||||
|
||||
c.done = make(chan struct{})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *SignalingClient) ConnectWithBackoff() error {
|
||||
t := time.NewTimer(c.backoff.Duration)
|
||||
for range t.C {
|
||||
if err := c.Connect(); err != nil {
|
||||
t.Reset(c.backoff.Next())
|
||||
|
||||
logrus.Errorf("Failed to connect: %s. Reconnecting in %s", err, c.backoff.Duration)
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *SignalingClient) read() {
|
||||
for {
|
||||
msg := &SignalingMessage{}
|
||||
if err := c.Conn.ReadJSON(msg); err != nil {
|
||||
if websocket.IsCloseError(err, websocket.CloseGoingAway, websocket.CloseNormalClosure) {
|
||||
|
||||
} else {
|
||||
logrus.Errorf("Failed to read: %s", err)
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
logrus.Infof("Received signaling message: %s", msg)
|
||||
|
||||
for _, cb := range c.messageCallbacks {
|
||||
cb(msg)
|
||||
}
|
||||
}
|
||||
|
||||
c.closed()
|
||||
}
|
||||
|
||||
func (c *SignalingClient) closed() {
|
||||
if err := c.Conn.Close(); err != nil {
|
||||
logrus.Errorf("Failed to close connection: %s", err)
|
||||
}
|
||||
|
||||
c.Conn = nil
|
||||
|
||||
for _, cb := range c.disconnectCallbacks {
|
||||
cb()
|
||||
}
|
||||
|
||||
close(c.done)
|
||||
|
||||
if c.isClosing {
|
||||
logrus.Infof("Connection closed")
|
||||
} else {
|
||||
logrus.Warnf("Connection lost. Reconnecting in %s", c.backoff.Duration)
|
||||
go c.ConnectWithBackoff()
|
||||
}
|
||||
}
|
|
@ -1,179 +0,0 @@
|
|||
package webrtc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
node "git.rwth-aachen.de/acs/public/villas/node/pkg"
|
||||
"github.com/pion/webrtc/v3"
|
||||
)
|
||||
|
||||
var (
|
||||
DefaultConfig = Config{
|
||||
Server: &url.URL{
|
||||
Scheme: "wss",
|
||||
Host: "https://ws-signal.villas.k8s.eonerc.rwth-aachen.de",
|
||||
},
|
||||
WebRTC: webrtc.Configuration{
|
||||
ICEServers: []webrtc.ICEServer{
|
||||
{
|
||||
URLs: []string{"stun:stun.l.google.com:19302"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
type Node struct {
|
||||
node.Node
|
||||
|
||||
*PeerConnection
|
||||
|
||||
Config Config
|
||||
|
||||
receive chan []byte
|
||||
send chan []byte
|
||||
|
||||
stop chan struct{}
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Server *url.URL
|
||||
Session string
|
||||
|
||||
WebRTC webrtc.Configuration
|
||||
}
|
||||
|
||||
func NewNode() node.Node {
|
||||
return &Node{
|
||||
stop: make(chan struct{}),
|
||||
send: make(chan []byte),
|
||||
receive: make(chan []byte),
|
||||
|
||||
Config: DefaultConfig,
|
||||
}
|
||||
}
|
||||
|
||||
func (n *Node) Parse(c []byte) error {
|
||||
var err error
|
||||
var cfg struct {
|
||||
Session *string `json:"session"`
|
||||
Server *string `json:"server,omitempty"`
|
||||
Ice *struct {
|
||||
Servers []struct {
|
||||
URLs []string `json:"urls,omitempty"`
|
||||
Username *string `json:"username,omitempty"`
|
||||
Password *string `json:"password,omitempty"`
|
||||
} `json:"servers,omitempty"`
|
||||
} `json:"ice,omitempty"`
|
||||
}
|
||||
|
||||
if err := json.Unmarshal(c, &cfg); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal config: %w", err)
|
||||
}
|
||||
|
||||
if cfg.Session == nil || *cfg.Session == "" {
|
||||
return errors.New("missing or invalid session name")
|
||||
} else {
|
||||
n.Config.Session = *cfg.Session
|
||||
}
|
||||
|
||||
if cfg.Server != nil {
|
||||
n.Config.Server, err = url.Parse(*cfg.Server)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to parse server address: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
if cfg.Ice != nil {
|
||||
for _, server := range cfg.Ice.Servers {
|
||||
iceServer := webrtc.ICEServer{
|
||||
URLs: server.URLs,
|
||||
}
|
||||
|
||||
if server.Username != nil && server.Password != nil {
|
||||
iceServer.Username = *server.Username
|
||||
iceServer.CredentialType = webrtc.ICECredentialTypePassword
|
||||
iceServer.Credential = *server.Password
|
||||
}
|
||||
|
||||
n.Config.WebRTC.ICEServers = append(n.Config.WebRTC.ICEServers, iceServer)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Prepare() error {
|
||||
var err error
|
||||
|
||||
n.PeerConnection, err = NewPeerConnection(n.config)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create peer connection: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Start() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Stop() error {
|
||||
close(n.stop)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) Read() ([]byte, error) {
|
||||
select {
|
||||
case <-n.stop:
|
||||
case b := <-n.receive:
|
||||
return b, nil
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (n *Node) Write(data []byte) error {
|
||||
n.send <- data
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n *Node) PollFDs() []int {
|
||||
return []int{}
|
||||
}
|
||||
|
||||
func (n *Node) NetemFDs() []int {
|
||||
return []int{}
|
||||
}
|
||||
|
||||
func (n *Node) Details() string {
|
||||
details := map[string]string{
|
||||
"server": n.Config.Server.String(),
|
||||
"session": n.Config.Session,
|
||||
}
|
||||
|
||||
kv := []string{}
|
||||
for k, v := range details {
|
||||
kv = append(kv, fmt.Sprintf("%s=%s", k, v))
|
||||
}
|
||||
|
||||
return strings.Join(kv, ", ")
|
||||
}
|
||||
|
||||
func (n *Node) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
node.RegisterNode("webrtc", NewNode)
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
package webrtc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/pion/webrtc/v3"
|
||||
)
|
||||
|
||||
type Connection struct {
|
||||
ID int `json:"id"`
|
||||
|
||||
Remote string `json:"remote"`
|
||||
UserAgent string `json:"user_agent"`
|
||||
Created time.Time `json:"created"`
|
||||
}
|
||||
|
||||
type ControlMessage struct {
|
||||
ConnectionID int `json:"connection_id"`
|
||||
Connections []Connection `json:"connections"`
|
||||
}
|
||||
|
||||
type Role struct {
|
||||
Polite bool `json:"polite"`
|
||||
First bool `json:"first"`
|
||||
}
|
||||
|
||||
type SignalingMessage struct {
|
||||
Description *webrtc.SessionDescription `json:"description,omitempty"`
|
||||
Candidate *webrtc.ICECandidate `json:"candidate,omitempty"`
|
||||
Control *ControlMessage `json:"control,omitempty"`
|
||||
}
|
||||
|
||||
func (msg SignalingMessage) String() string {
|
||||
b, _ := json.Marshal(msg)
|
||||
return string(b)
|
||||
}
|
|
@ -1,309 +0,0 @@
|
|||
package webrtc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/pion/webrtc/v3"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type PeerConnection struct {
|
||||
*webrtc.PeerConnection
|
||||
*SignalingClient
|
||||
|
||||
config *Config
|
||||
|
||||
makingOffer bool
|
||||
ignoreOffer bool
|
||||
|
||||
first bool
|
||||
polite bool
|
||||
|
||||
rollback bool
|
||||
}
|
||||
|
||||
func NewPeerConnection(config *Config) (*PeerConnection, error) {
|
||||
sc, err := NewSignalingClient(config.Server)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create signaling client: %w", err)
|
||||
}
|
||||
|
||||
ppc := &PeerConnection{
|
||||
SignalingClient: sc,
|
||||
config: config,
|
||||
}
|
||||
|
||||
ppc.SignalingClient.OnMessage(ppc.OnSignalingMessageHandler)
|
||||
ppc.SignalingClient.OnConnect(ppc.OnSignalingConnectedHandler)
|
||||
|
||||
if err := ppc.SignalingClient.ConnectWithBackoff(); err != nil {
|
||||
return nil, fmt.Errorf("failed to connect signaling client: %w", err)
|
||||
}
|
||||
|
||||
return ppc, nil
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) createPeerConnection() (*webrtc.PeerConnection, error) {
|
||||
logrus.Info("Created new peer connection")
|
||||
|
||||
// Create a new RTCPeerConnection
|
||||
ppc, err := webrtc.NewPeerConnection(pc.config.WebRTC)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create peer connection: %w", err)
|
||||
}
|
||||
|
||||
// Set the handler for ICE connection state
|
||||
// This will notify you when the peer has connected/disconnected
|
||||
ppc.OnConnectionStateChange(pc.OnConnectionStateChangeHandler)
|
||||
ppc.OnSignalingStateChange(pc.OnSignalingStateChangeHandler)
|
||||
ppc.OnICECandidate(pc.OnICECandidateHandler)
|
||||
ppc.OnNegotiationNeeded(pc.OnNegotiationNeededHandler)
|
||||
ppc.OnDataChannel(pc.OnDataChannelHandler)
|
||||
|
||||
if !pc.first {
|
||||
dc, err := ppc.CreateDataChannel("demo", nil)
|
||||
if err != nil {
|
||||
logrus.Panicf("Failed to create datachannel: %s", err)
|
||||
}
|
||||
|
||||
close := make(chan struct{})
|
||||
|
||||
dc.OnClose(func() { pc.OnDataChannelCloseHandler(dc, close) })
|
||||
dc.OnOpen(func() { pc.OnDataChannelOpenHandler(dc, close) })
|
||||
dc.OnMessage(func(msg webrtc.DataChannelMessage) { pc.OnDataChannelMessageHandler(dc, &msg, close) })
|
||||
}
|
||||
|
||||
return ppc, nil
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) rollbackPeerConnection() (*webrtc.PeerConnection, error) {
|
||||
pc.rollback = true
|
||||
defer func() { pc.rollback = false }()
|
||||
|
||||
// Close previous peer connection in before creating a new one
|
||||
// We need to do this as pion/webrtc currently does not support rollbacks
|
||||
if err := pc.PeerConnection.Close(); err != nil {
|
||||
return nil, fmt.Errorf("failed to close peer connection: %w", err)
|
||||
}
|
||||
|
||||
if ppc, err := pc.createPeerConnection(); err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
return ppc, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnDataChannelOpenHandler(dc *webrtc.DataChannel, close chan struct{}) {
|
||||
logrus.Infof("DataChannel opened: %s", dc.Label())
|
||||
|
||||
pc.SendMessages(dc, close)
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnDataChannelCloseHandler(dc *webrtc.DataChannel, cl chan struct{}) {
|
||||
logrus.Infof("DataChannel closed: %s", dc.Label())
|
||||
|
||||
close(cl)
|
||||
|
||||
// We close the connection here to avoid waiting for the disconnected event
|
||||
if err := pc.PeerConnection.Close(); err != nil {
|
||||
logrus.Errorf("Failed to close peer connection: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnDataChannelMessageHandler(dc *webrtc.DataChannel, msg *webrtc.DataChannelMessage, close chan struct{}) {
|
||||
logrus.Infof("Received: %s", string(msg.Data))
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) SendMessages(dc *webrtc.DataChannel, close chan struct{}) {
|
||||
logrus.Info("Start sending messages")
|
||||
|
||||
i := 0
|
||||
t := time.NewTicker(1 * time.Second)
|
||||
|
||||
loop:
|
||||
for {
|
||||
select {
|
||||
case <-t.C:
|
||||
msg := fmt.Sprintf("Hello %d", i)
|
||||
|
||||
logrus.Infof("Send: %s", msg)
|
||||
|
||||
if err := dc.SendText(msg); err != nil {
|
||||
logrus.Errorf("Failed to send message: %s", err)
|
||||
break loop
|
||||
}
|
||||
|
||||
case <-close:
|
||||
break loop
|
||||
}
|
||||
|
||||
i++
|
||||
}
|
||||
|
||||
logrus.Info("Stopped sending messages")
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnDataChannelHandler(dc *webrtc.DataChannel) {
|
||||
logrus.Infof("New DataChannel opened: %s", dc.Label())
|
||||
|
||||
close := make(chan struct{})
|
||||
|
||||
dc.OnOpen(func() { pc.OnDataChannelOpenHandler(dc, close) })
|
||||
dc.OnClose(func() { pc.OnDataChannelCloseHandler(dc, close) })
|
||||
dc.OnMessage(func(msg webrtc.DataChannelMessage) { pc.OnDataChannelMessageHandler(dc, &msg, close) })
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnICECandidateHandler(c *webrtc.ICECandidate) {
|
||||
if c == nil {
|
||||
logrus.Info("Candidate gathering concluded")
|
||||
return
|
||||
}
|
||||
|
||||
logrus.Infof("Found new candidate: %s", c)
|
||||
|
||||
if err := pc.SendSignalingMessage(&SignalingMessage{
|
||||
Candidate: c,
|
||||
}); err != nil {
|
||||
logrus.Errorf("Failed to send candidate: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnNegotiationNeededHandler() {
|
||||
logrus.Info("Negotation needed!")
|
||||
|
||||
pc.makingOffer = true
|
||||
|
||||
offer, err := pc.CreateOffer(nil)
|
||||
if err != nil {
|
||||
logrus.Panicf("Failed to create offer: %s", err)
|
||||
}
|
||||
|
||||
if err := pc.SetLocalDescription(offer); err != nil {
|
||||
logrus.Panicf("Failed to set local description: %s", err)
|
||||
}
|
||||
|
||||
if err := pc.SendSignalingMessage(&SignalingMessage{
|
||||
Description: &offer,
|
||||
}); err != nil {
|
||||
logrus.Panicf("Failed to send offer: %s", err)
|
||||
}
|
||||
|
||||
pc.makingOffer = false
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnSignalingStateChangeHandler(ss webrtc.SignalingState) {
|
||||
logrus.Infof("Signaling State has changed: %s", ss.String())
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnConnectionStateChangeHandler(pcs webrtc.PeerConnectionState) {
|
||||
logrus.Infof("Connection State has changed: %s", pcs.String())
|
||||
|
||||
switch pcs {
|
||||
case webrtc.PeerConnectionStateFailed:
|
||||
fallthrough
|
||||
case webrtc.PeerConnectionStateDisconnected:
|
||||
logrus.Info("Closing peer connection")
|
||||
|
||||
if err := pc.PeerConnection.Close(); err != nil {
|
||||
logrus.Panicf("Failed to close peer connection: %s", err)
|
||||
}
|
||||
|
||||
case webrtc.PeerConnectionStateClosed:
|
||||
if pc.rollback {
|
||||
return
|
||||
}
|
||||
|
||||
logrus.Info("Closed peer connection")
|
||||
|
||||
var err error
|
||||
pc.PeerConnection, err = pc.createPeerConnection()
|
||||
if err != nil {
|
||||
logrus.Panicf("Failed to set re-create peer connection: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnSignalingConnectedHandler() {
|
||||
var err error
|
||||
|
||||
logrus.Info("Signaling connected")
|
||||
|
||||
// Create initial peer connection
|
||||
if pc.PeerConnection == nil {
|
||||
if pc.PeerConnection, err = pc.createPeerConnection(); err != nil {
|
||||
logrus.Warnf("failed to create peer connection: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) OnSignalingMessageHandler(msg *SignalingMessage) {
|
||||
var err error
|
||||
|
||||
if msg.Control != nil {
|
||||
if len(msg.Control.Connections) > 2 {
|
||||
logrus.Panicf("There are already two peers connected to this session.")
|
||||
}
|
||||
|
||||
pc.first = true
|
||||
for _, c := range msg.Control.Connections {
|
||||
if c.ID < msg.Control.ConnectionID {
|
||||
pc.first = false
|
||||
}
|
||||
}
|
||||
|
||||
pc.polite = pc.first
|
||||
|
||||
logrus.Infof("New role: polite=%v, first=%v", pc.polite, pc.first)
|
||||
} else if msg.Description != nil {
|
||||
readyForOffer := !pc.makingOffer && pc.SignalingState() == webrtc.SignalingStateStable
|
||||
offerCollision := msg.Description.Type == webrtc.SDPTypeOffer && !readyForOffer
|
||||
|
||||
pc.ignoreOffer = !pc.polite && offerCollision
|
||||
if pc.ignoreOffer {
|
||||
return
|
||||
}
|
||||
|
||||
if msg.Description.Type == webrtc.SDPTypeOffer && pc.PeerConnection.SignalingState() != webrtc.SignalingStateStable {
|
||||
pc.PeerConnection, err = pc.rollbackPeerConnection()
|
||||
if err != nil {
|
||||
logrus.Panicf("Failed to rollback peer connection: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
if err := pc.PeerConnection.SetRemoteDescription(*msg.Description); err != nil {
|
||||
logrus.Panicf("Failed to set remote description: %s", err)
|
||||
}
|
||||
|
||||
if msg.Description.Type == webrtc.SDPTypeOffer {
|
||||
answer, err := pc.PeerConnection.CreateAnswer(nil)
|
||||
if err != nil {
|
||||
logrus.Panicf("Failed to create answer: %s", err)
|
||||
}
|
||||
|
||||
if err := pc.SetLocalDescription(answer); err != nil {
|
||||
logrus.Panicf("Failed to rollback signaling state: %s", err)
|
||||
}
|
||||
|
||||
pc.SendSignalingMessage(&SignalingMessage{
|
||||
Description: pc.LocalDescription(),
|
||||
})
|
||||
}
|
||||
} else if msg.Candidate != nil {
|
||||
if err := pc.AddICECandidate(msg.Candidate.ToJSON()); err != nil && !pc.ignoreOffer {
|
||||
logrus.Panicf("Failed to add new ICE candidate: %s", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (pc *PeerConnection) Close() error {
|
||||
if err := pc.SignalingClient.Close(); err != nil {
|
||||
return fmt.Errorf("failed to close signaling client: %w", err)
|
||||
}
|
||||
|
||||
if err := pc.PeerConnection.Close(); err != nil {
|
||||
return fmt.Errorf("failed to close peer connection: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package node
|
||||
|
||||
var (
|
||||
goNodeTypes = map[string]NodeCtor{}
|
||||
)
|
||||
|
||||
func RegisterNode(name string, ctor NodeCtor) {
|
||||
goNodeTypes[name] = ctor
|
||||
}
|
||||
|
||||
func NodeTypes() map[string]NodeCtor {
|
||||
return goNodeTypes
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project (test)
|
||||
|
||||
add_subdirectory(go)
|
||||
|
||||
add_executable(test test.c)
|
||||
|
||||
target_link_libraries(test goshim pthread)
|
|
@ -1,374 +0,0 @@
|
|||
# This is the CMakeCache file.
|
||||
# For build in directory: /global/projects/villas/node/lib/nodes/go/test/build
|
||||
# It was generated by CMake: /usr/bin/cmake
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_AR:FILEPATH=/usr/bin/ar
|
||||
|
||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
||||
// MinSizeRel ...
|
||||
CMAKE_BUILD_TYPE:STRING=
|
||||
|
||||
//Enable/Disable color output during build.
|
||||
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
||||
|
||||
//CXX compiler
|
||||
CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
|
||||
|
||||
//Flags used by the CXX compiler during all build types.
|
||||
CMAKE_CXX_FLAGS:STRING=
|
||||
|
||||
//Flags used by the CXX compiler during DEBUG builds.
|
||||
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the CXX compiler during MINSIZEREL builds.
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELEASE builds.
|
||||
CMAKE_CXX_FLAGS_RELEASE:STRING=-O2 -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//C compiler
|
||||
CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
|
||||
|
||||
//Flags used by the C compiler during all build types.
|
||||
CMAKE_C_FLAGS:STRING=
|
||||
|
||||
//Flags used by the C compiler during DEBUG builds.
|
||||
CMAKE_C_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the C compiler during MINSIZEREL builds.
|
||||
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELEASE builds.
|
||||
CMAKE_C_FLAGS_RELEASE:STRING=-O2 -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
|
||||
|
||||
//Flags used by the linker during all build types.
|
||||
CMAKE_EXE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during DEBUG builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during MINSIZEREL builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during RELEASE builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during RELWITHDEBINFO builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Enable/Disable output of compile commands during generation.
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
|
||||
|
||||
//Install path prefix, prepended onto install directories.
|
||||
CMAKE_INSTALL_PREFIX:PATH=/usr/local
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_LINKER:FILEPATH=/usr/bin/ld
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// all build types.
|
||||
CMAKE_MODULE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// DEBUG builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// MINSIZEREL builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELEASE builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELWITHDEBINFO builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_NM:FILEPATH=/usr/bin/nm
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_DESCRIPTION:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_NAME:STATIC=test
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_READELF:FILEPATH=/usr/bin/readelf
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during all build types.
|
||||
CMAKE_SHARED_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//If set, runtime paths are not added when installing shared libraries,
|
||||
// but are added when building.
|
||||
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
|
||||
|
||||
//If set, runtime paths are not added when using shared libraries.
|
||||
CMAKE_SKIP_RPATH:BOOL=NO
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during all build types.
|
||||
CMAKE_STATIC_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_STRIP:FILEPATH=/usr/bin/strip
|
||||
|
||||
//If this value is on, makefiles will be generated without the
|
||||
// .SILENT directive, and all commands will be echoed to the console
|
||||
// during the make. This is useful for debugging only. With Visual
|
||||
// Studio IDE projects all commands are done without /nologo.
|
||||
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
|
||||
|
||||
//Value Computed by CMake
|
||||
test_BINARY_DIR:STATIC=/global/projects/villas/node/lib/nodes/go/test/build
|
||||
|
||||
//Value Computed by CMake
|
||||
test_SOURCE_DIR:STATIC=/global/projects/villas/node/lib/nodes/go/test
|
||||
|
||||
//Value Computed by CMake
|
||||
test_go_BINARY_DIR:STATIC=/global/projects/villas/node/lib/nodes/go/test/build/go
|
||||
|
||||
//Value Computed by CMake
|
||||
test_go_SOURCE_DIR:STATIC=/global/projects/villas/node/lib/nodes/go/test/go
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//ADVANCED property for variable: CMAKE_ADDR2LINE
|
||||
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_AR
|
||||
CMAKE_AR-ADVANCED:INTERNAL=1
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=/global/projects/villas/node/lib/nodes/go/test/build
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=18
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
|
||||
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
|
||||
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER
|
||||
CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
|
||||
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
|
||||
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER
|
||||
CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
|
||||
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
|
||||
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_DLLTOOL
|
||||
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
|
||||
//Path to cache edit program executable.
|
||||
CMAKE_EDIT_COMMAND:INTERNAL=/usr/bin/ccmake
|
||||
//Executable file format
|
||||
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=/global/projects/villas/node/lib/nodes/go/test
|
||||
//Install .so files without execute permission.
|
||||
CMAKE_INSTALL_SO_NO_EXE:INTERNAL=0
|
||||
//ADVANCED property for variable: CMAKE_LINKER
|
||||
CMAKE_LINKER-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
|
||||
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_NM
|
||||
CMAKE_NM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2
|
||||
//ADVANCED property for variable: CMAKE_OBJCOPY
|
||||
CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_OBJDUMP
|
||||
CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
|
||||
//Platform information initialized
|
||||
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RANLIB
|
||||
CMAKE_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_READELF
|
||||
CMAKE_READELF-ADVANCED:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=/usr/share/cmake
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
|
||||
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
|
||||
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_RPATH
|
||||
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
|
||||
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STRIP
|
||||
CMAKE_STRIP-ADVANCED:INTERNAL=1
|
||||
//uname command
|
||||
CMAKE_UNAME:INTERNAL=/usr/bin/uname
|
||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
set(CMAKE_C_COMPILER "/usr/bin/cc")
|
||||
set(CMAKE_C_COMPILER_ARG1 "")
|
||||
set(CMAKE_C_COMPILER_ID "GNU")
|
||||
set(CMAKE_C_COMPILER_VERSION "8.4.1")
|
||||
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_C_COMPILER_WRAPPER "")
|
||||
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
|
||||
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
|
||||
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
|
||||
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
|
||||
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
|
||||
|
||||
set(CMAKE_C_PLATFORM_ID "Linux")
|
||||
set(CMAKE_C_SIMULATE_ID "")
|
||||
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_C_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCC 1)
|
||||
set(CMAKE_C_COMPILER_LOADED 1)
|
||||
set(CMAKE_C_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_C_ABI_COMPILED TRUE)
|
||||
set(CMAKE_COMPILER_IS_MINGW )
|
||||
set(CMAKE_COMPILER_IS_CYGWIN )
|
||||
if(CMAKE_COMPILER_IS_CYGWIN)
|
||||
set(CYGWIN 1)
|
||||
set(UNIX 1)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_COMPILER_ENV_VAR "CC")
|
||||
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
set(MINGW 1)
|
||||
endif()
|
||||
set(CMAKE_C_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
|
||||
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
set(CMAKE_C_LINKER_PREFERENCE 10)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_C_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_C_COMPILER_ABI "ELF")
|
||||
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
|
||||
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-redhat-linux/8/include;/usr/local/include;/usr/include")
|
||||
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
|
||||
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-redhat-linux/8;/usr/lib64;/lib64;/usr/lib")
|
||||
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
|
@ -1,89 +0,0 @@
|
|||
set(CMAKE_CXX_COMPILER "/usr/bin/c++")
|
||||
set(CMAKE_CXX_COMPILER_ARG1 "")
|
||||
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
set(CMAKE_CXX_COMPILER_VERSION "8.4.1")
|
||||
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_CXX_COMPILER_WRAPPER "")
|
||||
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
|
||||
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20")
|
||||
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
|
||||
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
|
||||
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
|
||||
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
|
||||
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
|
||||
|
||||
set(CMAKE_CXX_PLATFORM_ID "Linux")
|
||||
set(CMAKE_CXX_SIMULATE_ID "")
|
||||
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_CXX_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
set(CMAKE_CXX_COMPILER_LOADED 1)
|
||||
set(CMAKE_CXX_COMPILER_WORKS TRUE)
|
||||
set(CMAKE_CXX_ABI_COMPILED TRUE)
|
||||
set(CMAKE_COMPILER_IS_MINGW )
|
||||
set(CMAKE_COMPILER_IS_CYGWIN )
|
||||
if(CMAKE_COMPILER_IS_CYGWIN)
|
||||
set(CYGWIN 1)
|
||||
set(UNIX 1)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
||||
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
set(MINGW 1)
|
||||
endif()
|
||||
set(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
|
||||
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
|
||||
foreach (lang C OBJC OBJCXX)
|
||||
if (CMAKE_${lang}_COMPILER_ID_RUN)
|
||||
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
|
||||
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_CXX_COMPILER_ABI "ELF")
|
||||
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
|
||||
|
||||
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/8;/usr/include/c++/8/x86_64-redhat-linux;/usr/include/c++/8/backward;/usr/lib/gcc/x86_64-redhat-linux/8/include;/usr/local/include;/usr/include")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-redhat-linux/8;/usr/lib64;/lib64;/usr/lib")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
Binary file not shown.
Binary file not shown.
|
@ -1,15 +0,0 @@
|
|||
set(CMAKE_HOST_SYSTEM "Linux-4.18.0-305.3.1.el8_4.x86_64")
|
||||
set(CMAKE_HOST_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_HOST_SYSTEM_VERSION "4.18.0-305.3.1.el8_4.x86_64")
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_SYSTEM "Linux-4.18.0-305.3.1.el8_4.x86_64")
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_VERSION "4.18.0-305.3.1.el8_4.x86_64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
|
||||
set(CMAKE_SYSTEM_LOADED 1)
|
|
@ -1,674 +0,0 @@
|
|||
#ifdef __cplusplus
|
||||
# error "A C++ compiler has been selected for C."
|
||||
#endif
|
||||
|
||||
#if defined(__18CXX)
|
||||
# define ID_VOID_MAIN
|
||||
#endif
|
||||
#if defined(__CLASSIC_C__)
|
||||
/* cv-qualifiers did not exist in K&R C */
|
||||
# define const
|
||||
# define volatile
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_C)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_C >= 0x5100
|
||||
/* __SUNPRO_C = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_cc)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_cc = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
|
||||
|
||||
#elif defined(__DECC)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECC_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
|
||||
|
||||
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__TINYC__)
|
||||
# define COMPILER_ID "TinyCC"
|
||||
|
||||
#elif defined(__BCC__)
|
||||
# define COMPILER_ID "Bruce"
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
|
||||
# define COMPILER_ID "SDCC"
|
||||
# if defined(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
|
||||
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
|
||||
# else
|
||||
/* SDCC = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# elif defined(__VXWORKS__)
|
||||
# define PLATFORM_ID "VxWorks"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
|
||||
#if !defined(__STDC__)
|
||||
# if (defined(_MSC_VER) && !defined(__clang__)) \
|
||||
|| (defined(__ibmxl__) || defined(__IBMC__))
|
||||
# define C_DIALECT "90"
|
||||
# else
|
||||
# define C_DIALECT
|
||||
# endif
|
||||
#elif __STDC_VERSION__ >= 201000L
|
||||
# define C_DIALECT "11"
|
||||
#elif __STDC_VERSION__ >= 199901L
|
||||
# define C_DIALECT "99"
|
||||
#else
|
||||
# define C_DIALECT "90"
|
||||
#endif
|
||||
const char* info_language_dialect_default =
|
||||
"INFO" ":" "dialect_default[" C_DIALECT "]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef ID_VOID_MAIN
|
||||
void main() {}
|
||||
#else
|
||||
# if defined(__CLASSIC_C__)
|
||||
int main(argc, argv) int argc; char *argv[];
|
||||
# else
|
||||
int main(int argc, char* argv[])
|
||||
# endif
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
require += info_arch[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
#endif
|
Binary file not shown.
|
@ -1,663 +0,0 @@
|
|||
/* This source file must have a .cpp extension so that all C++ compilers
|
||||
recognize the extension without flags. Borland does not know .cxx for
|
||||
example. */
|
||||
#ifndef __cplusplus
|
||||
# error "A C compiler has been selected for C++."
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__COMO__)
|
||||
# define COMPILER_ID "Comeau"
|
||||
/* __COMO_VERSION__ = VRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_CC)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_CC >= 0x5100
|
||||
/* __SUNPRO_CC = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_aCC)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_aCC = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
|
||||
|
||||
#elif defined(__DECCXX)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECCXX_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
|
||||
|
||||
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# if defined(__GNUC__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# elif defined(__VXWORKS__)
|
||||
# define PLATFORM_ID "VxWorks"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
|
||||
# if defined(__INTEL_CXX11_MODE__)
|
||||
# if defined(__cpp_aggregate_nsdmi)
|
||||
# define CXX_STD 201402L
|
||||
# else
|
||||
# define CXX_STD 201103L
|
||||
# endif
|
||||
# else
|
||||
# define CXX_STD 199711L
|
||||
# endif
|
||||
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
|
||||
# define CXX_STD _MSVC_LANG
|
||||
#else
|
||||
# define CXX_STD __cplusplus
|
||||
#endif
|
||||
|
||||
const char* info_language_dialect_default = "INFO" ":" "dialect_default["
|
||||
#if CXX_STD > 201703L
|
||||
"20"
|
||||
#elif CXX_STD >= 201703L
|
||||
"17"
|
||||
#elif CXX_STD >= 201402L
|
||||
"14"
|
||||
#elif CXX_STD >= 201103L
|
||||
"11"
|
||||
#else
|
||||
"98"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
Binary file not shown.
|
@ -1,16 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# Relative path conversion top directories.
|
||||
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/global/projects/villas/node/lib/nodes/go/test")
|
||||
set(CMAKE_RELATIVE_PATH_TOP_BINARY "/global/projects/villas/node/lib/nodes/go/test/build")
|
||||
|
||||
# Force unix paths in dependencies.
|
||||
set(CMAKE_FORCE_UNIX_PATHS 1)
|
||||
|
||||
|
||||
# The C and CXX include file regular expressions for this directory.
|
||||
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
|
||||
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
|
||||
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
|
||||
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
|
|
@ -1,409 +0,0 @@
|
|||
The system is: Linux - 4.18.0-305.3.1.el8_4.x86_64 - x86_64
|
||||
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
|
||||
Compiler: /usr/bin/cc
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
The output was:
|
||||
0
|
||||
|
||||
|
||||
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
|
||||
|
||||
The C compiler identification is GNU, found in "/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/3.18.2/CompilerIdC/a.out"
|
||||
|
||||
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
|
||||
Compiler: /usr/bin/c++
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
The output was:
|
||||
0
|
||||
|
||||
|
||||
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
|
||||
|
||||
The CXX compiler identification is GNU, found in "/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/3.18.2/CompilerIdCXX/a.out"
|
||||
|
||||
Detecting C compiler ABI info compiled with the following output:
|
||||
Change Dir: /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp
|
||||
|
||||
Run Build Command(s):/usr/bin/gmake cmTC_194bc/fast && /usr/bin/gmake -f CMakeFiles/cmTC_194bc.dir/build.make CMakeFiles/cmTC_194bc.dir/build
|
||||
gmake[1]: Entering directory '/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp'
|
||||
Building C object CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o
|
||||
/usr/bin/cc -v -o CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake/Modules/CMakeCCompilerABI.c
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/cc
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
|
||||
/usr/libexec/gcc/x86_64-redhat-linux/8/cc1 -quiet -v /usr/share/cmake/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -version -o /tmp/ccQ2G8ES.s
|
||||
GNU C17 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)
|
||||
compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.0.2, isl version isl-0.16.1-GMP
|
||||
|
||||
warning: MPC header version 1.0.2 differs from library version 1.1.0.
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
|
||||
#include "..." search starts here:
|
||||
#include <...> search starts here:
|
||||
/usr/lib/gcc/x86_64-redhat-linux/8/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
End of search list.
|
||||
GNU C17 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)
|
||||
compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.0.2, isl version isl-0.16.1-GMP
|
||||
|
||||
warning: MPC header version 1.0.2 differs from library version 1.1.0.
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
Compiler executable checksum: 4200654a8a5e4de8e22bfb5ed3a1f615
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
|
||||
as -v --64 -o CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o /tmp/ccQ2G8ES.s
|
||||
GNU assembler version 2.30 (x86_64-redhat-linux) using BFD version version 2.30-93.el8
|
||||
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64'
|
||||
Linking C executable cmTC_194bc
|
||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_194bc.dir/link.txt --verbose=1
|
||||
/usr/bin/cc -v -rdynamic CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -o cmTC_194bc
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/cc
|
||||
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)
|
||||
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_194bc' '-mtune=generic' '-march=x86-64'
|
||||
/usr/libexec/gcc/x86_64-redhat-linux/8/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccStT1og.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_194bc /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../.. CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/8/crtend.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o
|
||||
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_194bc' '-mtune=generic' '-march=x86-64'
|
||||
gmake[1]: Leaving directory '/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp'
|
||||
|
||||
|
||||
|
||||
Parsed C implicit include dir info from above output: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [/usr/lib/gcc/x86_64-redhat-linux/8/include]
|
||||
add: [/usr/local/include]
|
||||
add: [/usr/include]
|
||||
end of search list found
|
||||
collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/8/include] ==> [/usr/lib/gcc/x86_64-redhat-linux/8/include]
|
||||
collapse include dir [/usr/local/include] ==> [/usr/local/include]
|
||||
collapse include dir [/usr/include] ==> [/usr/include]
|
||||
implicit include dirs: [/usr/lib/gcc/x86_64-redhat-linux/8/include;/usr/local/include;/usr/include]
|
||||
|
||||
|
||||
Parsed C implicit link information from above output:
|
||||
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||
ignore line: [Change Dir: /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp]
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s):/usr/bin/gmake cmTC_194bc/fast && /usr/bin/gmake -f CMakeFiles/cmTC_194bc.dir/build.make CMakeFiles/cmTC_194bc.dir/build]
|
||||
ignore line: [gmake[1]: Entering directory '/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp']
|
||||
ignore line: [Building C object CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o]
|
||||
ignore line: [/usr/bin/cc -v -o CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake/Modules/CMakeCCompilerABI.c]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/cc]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-redhat-linux]
|
||||
ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ /usr/libexec/gcc/x86_64-redhat-linux/8/cc1 -quiet -v /usr/share/cmake/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -version -o /tmp/ccQ2G8ES.s]
|
||||
ignore line: [GNU C17 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)]
|
||||
ignore line: [ compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1) GMP version 6.1.2 MPFR version 3.1.6-p2 MPC version 1.0.2 isl version isl-0.16.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [warning: MPC header version 1.0.2 differs from library version 1.1.0.]
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"]
|
||||
ignore line: [#include "..." search starts here:]
|
||||
ignore line: [#include <...> search starts here:]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/8/include]
|
||||
ignore line: [ /usr/local/include]
|
||||
ignore line: [ /usr/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [GNU C17 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)]
|
||||
ignore line: [ compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1) GMP version 6.1.2 MPFR version 3.1.6-p2 MPC version 1.0.2 isl version isl-0.16.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [warning: MPC header version 1.0.2 differs from library version 1.1.0.]
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [Compiler executable checksum: 4200654a8a5e4de8e22bfb5ed3a1f615]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ as -v --64 -o CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o /tmp/ccQ2G8ES.s]
|
||||
ignore line: [GNU assembler version 2.30 (x86_64-redhat-linux) using BFD version version 2.30-93.el8]
|
||||
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o' '-c' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [Linking C executable cmTC_194bc]
|
||||
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_194bc.dir/link.txt --verbose=1]
|
||||
ignore line: [/usr/bin/cc -v -rdynamic CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -o cmTC_194bc ]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/cc]
|
||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-redhat-linux]
|
||||
ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC) ]
|
||||
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_194bc' '-mtune=generic' '-march=x86-64']
|
||||
link line: [ /usr/libexec/gcc/x86_64-redhat-linux/8/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccStT1og.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_194bc /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../.. CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-redhat-linux/8/crtend.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o]
|
||||
arg [/usr/libexec/gcc/x86_64-redhat-linux/8/collect2] ==> ignore
|
||||
arg [-plugin] ==> ignore
|
||||
arg [/usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so] ==> ignore
|
||||
arg [-plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=/tmp/ccStT1og.res] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [--build-id] ==> ignore
|
||||
arg [--no-add-needed] ==> ignore
|
||||
arg [--eh-frame-hdr] ==> ignore
|
||||
arg [--hash-style=gnu] ==> ignore
|
||||
arg [-m] ==> ignore
|
||||
arg [elf_x86_64] ==> ignore
|
||||
arg [-export-dynamic] ==> ignore
|
||||
arg [-dynamic-linker] ==> ignore
|
||||
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||
arg [-o] ==> ignore
|
||||
arg [cmTC_194bc] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o] ==> ignore
|
||||
arg [-L/usr/lib/gcc/x86_64-redhat-linux/8] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/8]
|
||||
arg [-L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64]
|
||||
arg [-L/lib/../lib64] ==> dir [/lib/../lib64]
|
||||
arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64]
|
||||
arg [-L/usr/lib/gcc/x86_64-redhat-linux/8/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../..]
|
||||
arg [CMakeFiles/cmTC_194bc.dir/CMakeCCompilerABI.c.o] ==> ignore
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [--as-needed] ==> ignore
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [--no-as-needed] ==> ignore
|
||||
arg [-lc] ==> lib [c]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [--as-needed] ==> ignore
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [--no-as-needed] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/crtend.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o] ==> ignore
|
||||
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/8] ==> [/usr/lib/gcc/x86_64-redhat-linux/8]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64] ==> [/usr/lib64]
|
||||
collapse library dir [/lib/../lib64] ==> [/lib64]
|
||||
collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../..] ==> [/usr/lib]
|
||||
implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
|
||||
implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/8;/usr/lib64;/lib64;/usr/lib]
|
||||
implicit fwks: []
|
||||
|
||||
|
||||
Detecting CXX compiler ABI info compiled with the following output:
|
||||
Change Dir: /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp
|
||||
|
||||
Run Build Command(s):/usr/bin/gmake cmTC_bce9b/fast && /usr/bin/gmake -f CMakeFiles/cmTC_bce9b.dir/build.make CMakeFiles/cmTC_bce9b.dir/build
|
||||
gmake[1]: Entering directory '/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp'
|
||||
Building CXX object CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o
|
||||
/usr/bin/c++ -v -o CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/c++
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
/usr/libexec/gcc/x86_64-redhat-linux/8/cc1plus -quiet -v -D_GNU_SOURCE /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccT60iIG.s
|
||||
GNU C++14 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)
|
||||
compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.0.2, isl version isl-0.16.1-GMP
|
||||
|
||||
warning: MPC header version 1.0.2 differs from library version 1.1.0.
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"
|
||||
#include "..." search starts here:
|
||||
#include <...> search starts here:
|
||||
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8
|
||||
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux
|
||||
/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward
|
||||
/usr/lib/gcc/x86_64-redhat-linux/8/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
End of search list.
|
||||
GNU C++14 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)
|
||||
compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.0.2, isl version isl-0.16.1-GMP
|
||||
|
||||
warning: MPC header version 1.0.2 differs from library version 1.1.0.
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
Compiler executable checksum: b52810184d801135c3a3dd4ab4785304
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
as -v --64 -o CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccT60iIG.s
|
||||
GNU assembler version 2.30 (x86_64-redhat-linux) using BFD version version 2.30-93.el8
|
||||
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
Linking CXX executable cmTC_bce9b
|
||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bce9b.dir/link.txt --verbose=1
|
||||
/usr/bin/c++ -v -rdynamic CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_bce9b
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/c++
|
||||
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC)
|
||||
COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_bce9b' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
/usr/libexec/gcc/x86_64-redhat-linux/8/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccMOKZ64.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_bce9b /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../.. CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/8/crtend.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o
|
||||
COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_bce9b' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
gmake[1]: Leaving directory '/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp'
|
||||
|
||||
|
||||
|
||||
Parsed CXX implicit include dir info from above output: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8]
|
||||
add: [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux]
|
||||
add: [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward]
|
||||
add: [/usr/lib/gcc/x86_64-redhat-linux/8/include]
|
||||
add: [/usr/local/include]
|
||||
add: [/usr/include]
|
||||
end of search list found
|
||||
collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8] ==> [/usr/include/c++/8]
|
||||
collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux] ==> [/usr/include/c++/8/x86_64-redhat-linux]
|
||||
collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward] ==> [/usr/include/c++/8/backward]
|
||||
collapse include dir [/usr/lib/gcc/x86_64-redhat-linux/8/include] ==> [/usr/lib/gcc/x86_64-redhat-linux/8/include]
|
||||
collapse include dir [/usr/local/include] ==> [/usr/local/include]
|
||||
collapse include dir [/usr/include] ==> [/usr/include]
|
||||
implicit include dirs: [/usr/include/c++/8;/usr/include/c++/8/x86_64-redhat-linux;/usr/include/c++/8/backward;/usr/lib/gcc/x86_64-redhat-linux/8/include;/usr/local/include;/usr/include]
|
||||
|
||||
|
||||
Parsed CXX implicit link information from above output:
|
||||
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||
ignore line: [Change Dir: /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp]
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s):/usr/bin/gmake cmTC_bce9b/fast && /usr/bin/gmake -f CMakeFiles/cmTC_bce9b.dir/build.make CMakeFiles/cmTC_bce9b.dir/build]
|
||||
ignore line: [gmake[1]: Entering directory '/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/CMakeTmp']
|
||||
ignore line: [Building CXX object CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o]
|
||||
ignore line: [/usr/bin/c++ -v -o CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/c++]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-redhat-linux]
|
||||
ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ /usr/libexec/gcc/x86_64-redhat-linux/8/cc1plus -quiet -v -D_GNU_SOURCE /usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/ccT60iIG.s]
|
||||
ignore line: [GNU C++14 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)]
|
||||
ignore line: [ compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1) GMP version 6.1.2 MPFR version 3.1.6-p2 MPC version 1.0.2 isl version isl-0.16.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [warning: MPC header version 1.0.2 differs from library version 1.1.0.]
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include"]
|
||||
ignore line: [#include "..." search starts here:]
|
||||
ignore line: [#include <...> search starts here:]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/x86_64-redhat-linux]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/backward]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-redhat-linux/8/include]
|
||||
ignore line: [ /usr/local/include]
|
||||
ignore line: [ /usr/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [GNU C++14 (GCC) version 8.4.1 20200928 (Red Hat 8.4.1-1) (x86_64-redhat-linux)]
|
||||
ignore line: [ compiled by GNU C version 8.4.1 20200928 (Red Hat 8.4.1-1) GMP version 6.1.2 MPFR version 3.1.6-p2 MPC version 1.0.2 isl version isl-0.16.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [warning: MPC header version 1.0.2 differs from library version 1.1.0.]
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [Compiler executable checksum: b52810184d801135c3a3dd4ab4785304]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ as -v --64 -o CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o /tmp/ccT60iIG.s]
|
||||
ignore line: [GNU assembler version 2.30 (x86_64-redhat-linux) using BFD version version 2.30-93.el8]
|
||||
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [Linking CXX executable cmTC_bce9b]
|
||||
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bce9b.dir/link.txt --verbose=1]
|
||||
ignore line: [/usr/bin/c++ -v -rdynamic CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_bce9b ]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/c++]
|
||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-redhat-linux]
|
||||
ignore line: [Configured with: ../configure --enable-bootstrap --enable-languages=c c++ fortran lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 8.4.1 20200928 (Red Hat 8.4.1-1) (GCC) ]
|
||||
ignore line: [COMPILER_PATH=/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/8/:/usr/libexec/gcc/x86_64-redhat-linux/:/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-redhat-linux/8/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-redhat-linux/8/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-rdynamic' '-o' 'cmTC_bce9b' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
link line: [ /usr/libexec/gcc/x86_64-redhat-linux/8/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper -plugin-opt=-fresolution=/tmp/ccMOKZ64.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_bce9b /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o -L/usr/lib/gcc/x86_64-redhat-linux/8 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/8/../../.. CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/8/crtend.o /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o]
|
||||
arg [/usr/libexec/gcc/x86_64-redhat-linux/8/collect2] ==> ignore
|
||||
arg [-plugin] ==> ignore
|
||||
arg [/usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so] ==> ignore
|
||||
arg [-plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=/tmp/ccMOKZ64.res] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [--build-id] ==> ignore
|
||||
arg [--no-add-needed] ==> ignore
|
||||
arg [--eh-frame-hdr] ==> ignore
|
||||
arg [--hash-style=gnu] ==> ignore
|
||||
arg [-m] ==> ignore
|
||||
arg [elf_x86_64] ==> ignore
|
||||
arg [-export-dynamic] ==> ignore
|
||||
arg [-dynamic-linker] ==> ignore
|
||||
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||
arg [-o] ==> ignore
|
||||
arg [cmTC_bce9b] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crti.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/crtbegin.o] ==> ignore
|
||||
arg [-L/usr/lib/gcc/x86_64-redhat-linux/8] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/8]
|
||||
arg [-L/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64]
|
||||
arg [-L/lib/../lib64] ==> dir [/lib/../lib64]
|
||||
arg [-L/usr/lib/../lib64] ==> dir [/usr/lib/../lib64]
|
||||
arg [-L/usr/lib/gcc/x86_64-redhat-linux/8/../../..] ==> dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../..]
|
||||
arg [CMakeFiles/cmTC_bce9b.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore
|
||||
arg [-lstdc++] ==> lib [stdc++]
|
||||
arg [-lm] ==> lib [m]
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [-lc] ==> lib [c]
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/crtend.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crtn.o] ==> ignore
|
||||
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/8] ==> [/usr/lib/gcc/x86_64-redhat-linux/8]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64] ==> [/usr/lib64]
|
||||
collapse library dir [/lib/../lib64] ==> [/lib64]
|
||||
collapse library dir [/usr/lib/../lib64] ==> [/usr/lib64]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-redhat-linux/8/../../..] ==> [/usr/lib]
|
||||
implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc]
|
||||
implicit dirs: [/usr/lib/gcc/x86_64-redhat-linux/8;/usr/lib64;/lib64;/usr/lib]
|
||||
implicit fwks: []
|
||||
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# Hashes of file build rules.
|
||||
e95f75a28652e6ca21e4beba0a9f3dc4 go/CMakeFiles/shim_go
|
||||
fa0c0014583ef68ee4d523d5a4786b76 go/test.so
|
|
@ -1,124 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# The generator used is:
|
||||
set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
|
||||
|
||||
# The top level Makefile was generated from the following files:
|
||||
set(CMAKE_MAKEFILE_DEPENDS
|
||||
"CMakeCache.txt"
|
||||
"../CMakeLists.txt"
|
||||
"CMakeFiles/3.18.2/CMakeCCompiler.cmake"
|
||||
"CMakeFiles/3.18.2/CMakeCXXCompiler.cmake"
|
||||
"CMakeFiles/3.18.2/CMakeSystem.cmake"
|
||||
"../go/CMakeLists.txt"
|
||||
"/usr/share/cmake/Modules/CMakeCCompiler.cmake.in"
|
||||
"/usr/share/cmake/Modules/CMakeCCompilerABI.c"
|
||||
"/usr/share/cmake/Modules/CMakeCInformation.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeCXXCompiler.cmake.in"
|
||||
"/usr/share/cmake/Modules/CMakeCXXCompilerABI.cpp"
|
||||
"/usr/share/cmake/Modules/CMakeCXXInformation.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeCommonLanguageInclude.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeCompilerIdDetection.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeDetermineCCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeDetermineCXXCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeDetermineCompileFeatures.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeDetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeDetermineCompilerABI.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeDetermineSystem.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeFindBinUtils.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeGenericSystem.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeInitializeConfigs.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeLanguageInformation.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeParseImplicitIncludeInfo.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeParseImplicitLinkInfo.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeSystem.cmake.in"
|
||||
"/usr/share/cmake/Modules/CMakeSystemSpecificInformation.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeTestCCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeTestCompilerCommon.cmake"
|
||||
"/usr/share/cmake/Modules/CMakeUnixFindMake.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/ADSP-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/ARMClang-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Borland-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Bruce-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Clang-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Cray-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/GHS-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/GNU-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/GNU-C.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/GNU-CXX.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/GNU-FindBinUtils.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/GNU.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/HP-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/IAR-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Intel-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/MSVC-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/NVIDIA-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/PGI-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/PathScale-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/SCO-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/TI-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/Watcom-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/XL-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/XLClang-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
|
||||
"/usr/share/cmake/Modules/Internal/CMakeCheckCompilerFlag.cmake"
|
||||
"/usr/share/cmake/Modules/Internal/FeatureTesting.cmake"
|
||||
"/usr/share/cmake/Modules/Platform/Linux-Determine-CXX.cmake"
|
||||
"/usr/share/cmake/Modules/Platform/Linux-GNU-C.cmake"
|
||||
"/usr/share/cmake/Modules/Platform/Linux-GNU-CXX.cmake"
|
||||
"/usr/share/cmake/Modules/Platform/Linux-GNU.cmake"
|
||||
"/usr/share/cmake/Modules/Platform/Linux.cmake"
|
||||
"/usr/share/cmake/Modules/Platform/UnixPaths.cmake"
|
||||
)
|
||||
|
||||
# The corresponding makefile is:
|
||||
set(CMAKE_MAKEFILE_OUTPUTS
|
||||
"Makefile"
|
||||
"CMakeFiles/cmake.check_cache"
|
||||
)
|
||||
|
||||
# Byproducts of CMake generate step:
|
||||
set(CMAKE_MAKEFILE_PRODUCTS
|
||||
"CMakeFiles/3.18.2/CMakeSystem.cmake"
|
||||
"CMakeFiles/3.18.2/CMakeCCompiler.cmake"
|
||||
"CMakeFiles/3.18.2/CMakeCXXCompiler.cmake"
|
||||
"CMakeFiles/3.18.2/CMakeCCompiler.cmake"
|
||||
"CMakeFiles/3.18.2/CMakeCXXCompiler.cmake"
|
||||
"CMakeFiles/CMakeDirectoryInformation.cmake"
|
||||
"go/CMakeFiles/CMakeDirectoryInformation.cmake"
|
||||
)
|
||||
|
||||
# Dependency information for all targets:
|
||||
set(CMAKE_DEPEND_INFO_FILES
|
||||
"CMakeFiles/test.dir/DependInfo.cmake"
|
||||
"go/CMakeFiles/shim_go.dir/DependInfo.cmake"
|
||||
)
|
|
@ -1,172 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
|
||||
.PHONY : default_target
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /global/projects/villas/node/lib/nodes/go/test
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /global/projects/villas/node/lib/nodes/go/test/build
|
||||
|
||||
#=============================================================================
|
||||
# Directory level rules for the build root directory
|
||||
|
||||
# The main recursive "all" target.
|
||||
all: CMakeFiles/test.dir/all
|
||||
all: go/all
|
||||
|
||||
.PHONY : all
|
||||
|
||||
# The main recursive "preinstall" target.
|
||||
preinstall: go/preinstall
|
||||
|
||||
.PHONY : preinstall
|
||||
|
||||
# The main recursive "clean" target.
|
||||
clean: CMakeFiles/test.dir/clean
|
||||
clean: go/clean
|
||||
|
||||
.PHONY : clean
|
||||
|
||||
#=============================================================================
|
||||
# Directory level rules for directory go
|
||||
|
||||
# Recursive "all" directory target.
|
||||
go/all:
|
||||
|
||||
.PHONY : go/all
|
||||
|
||||
# Recursive "preinstall" directory target.
|
||||
go/preinstall:
|
||||
|
||||
.PHONY : go/preinstall
|
||||
|
||||
# Recursive "clean" directory target.
|
||||
go/clean: go/CMakeFiles/shim_go.dir/clean
|
||||
|
||||
.PHONY : go/clean
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for target CMakeFiles/test.dir
|
||||
|
||||
# All Build rule for target.
|
||||
CMakeFiles/test.dir/all: go/CMakeFiles/shim_go.dir/all
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/depend
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/build
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles --progress-num=2,3 "Built target test"
|
||||
.PHONY : CMakeFiles/test.dir/all
|
||||
|
||||
# Build rule for subdir invocation for target.
|
||||
CMakeFiles/test.dir/rule: cmake_check_build_system
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles 3
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/test.dir/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles 0
|
||||
.PHONY : CMakeFiles/test.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
test: CMakeFiles/test.dir/rule
|
||||
|
||||
.PHONY : test
|
||||
|
||||
# clean rule for target.
|
||||
CMakeFiles/test.dir/clean:
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/clean
|
||||
.PHONY : CMakeFiles/test.dir/clean
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for target go/CMakeFiles/shim_go.dir
|
||||
|
||||
# All Build rule for target.
|
||||
go/CMakeFiles/shim_go.dir/all:
|
||||
$(MAKE) $(MAKESILENT) -f go/CMakeFiles/shim_go.dir/build.make go/CMakeFiles/shim_go.dir/depend
|
||||
$(MAKE) $(MAKESILENT) -f go/CMakeFiles/shim_go.dir/build.make go/CMakeFiles/shim_go.dir/build
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles --progress-num=1 "Built target shim_go"
|
||||
.PHONY : go/CMakeFiles/shim_go.dir/all
|
||||
|
||||
# Build rule for subdir invocation for target.
|
||||
go/CMakeFiles/shim_go.dir/rule: cmake_check_build_system
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles 1
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 go/CMakeFiles/shim_go.dir/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles 0
|
||||
.PHONY : go/CMakeFiles/shim_go.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
shim_go: go/CMakeFiles/shim_go.dir/rule
|
||||
|
||||
.PHONY : shim_go
|
||||
|
||||
# clean rule for target.
|
||||
go/CMakeFiles/shim_go.dir/clean:
|
||||
$(MAKE) $(MAKESILENT) -f go/CMakeFiles/shim_go.dir/build.make go/CMakeFiles/shim_go.dir/clean
|
||||
.PHONY : go/CMakeFiles/shim_go.dir/clean
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/rebuild_cache.dir
|
||||
/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/test.dir
|
||||
/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/edit_cache.dir
|
||||
/global/projects/villas/node/lib/nodes/go/test/build/go/CMakeFiles/rebuild_cache.dir
|
||||
/global/projects/villas/node/lib/nodes/go/test/build/go/CMakeFiles/shim_go.dir
|
||||
/global/projects/villas/node/lib/nodes/go/test/build/go/CMakeFiles/edit_cache.dir
|
|
@ -1 +0,0 @@
|
|||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
|
@ -1 +0,0 @@
|
|||
3
|
|
@ -1,18 +0,0 @@
|
|||
#IncludeRegexLine: ^[ ]*[#%][ ]*(include|import)[ ]*[<"]([^">]+)([">])
|
||||
|
||||
#IncludeRegexScan: ^.*$
|
||||
|
||||
#IncludeRegexComplain: ^$
|
||||
|
||||
#IncludeRegexTransform:
|
||||
|
||||
/global/projects/villas/node/lib/nodes/go/test/test.c
|
||||
stdio.h
|
||||
-
|
||||
test.h
|
||||
/global/projects/villas/node/lib/nodes/go/test/test.h
|
||||
|
||||
go/test.h
|
||||
stddef.h
|
||||
-
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# The set of languages for which implicit dependencies are needed:
|
||||
set(CMAKE_DEPENDS_LANGUAGES
|
||||
"C"
|
||||
)
|
||||
# The set of files for implicit dependencies of each language:
|
||||
set(CMAKE_DEPENDS_CHECK_C
|
||||
"/global/projects/villas/node/lib/nodes/go/test/test.c" "/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/test.dir/test.c.o"
|
||||
)
|
||||
set(CMAKE_C_COMPILER_ID "GNU")
|
||||
|
||||
# The include file search paths:
|
||||
set(CMAKE_C_TARGET_INCLUDE_PATH
|
||||
"go"
|
||||
)
|
||||
|
||||
# Targets to which this target links.
|
||||
set(CMAKE_TARGET_LINKED_INFO_FILES
|
||||
)
|
||||
|
||||
# Fortran module output directory.
|
||||
set(CMAKE_Fortran_TARGET_MODULE_DIR "")
|
|
@ -1,118 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# Delete rule output on recipe failure.
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /global/projects/villas/node/lib/nodes/go/test
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /global/projects/villas/node/lib/nodes/go/test/build
|
||||
|
||||
# Include any dependencies generated for this target.
|
||||
include CMakeFiles/test.dir/depend.make
|
||||
|
||||
# Include the progress variables for this target.
|
||||
include CMakeFiles/test.dir/progress.make
|
||||
|
||||
# Include the compile flags for this target's objects.
|
||||
include CMakeFiles/test.dir/flags.make
|
||||
|
||||
CMakeFiles/test.dir/test.c.o: CMakeFiles/test.dir/flags.make
|
||||
CMakeFiles/test.dir/test.c.o: ../test.c
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/test.dir/test.c.o"
|
||||
/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/test.dir/test.c.o -c /global/projects/villas/node/lib/nodes/go/test/test.c
|
||||
|
||||
CMakeFiles/test.dir/test.c.i: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/test.dir/test.c.i"
|
||||
/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /global/projects/villas/node/lib/nodes/go/test/test.c > CMakeFiles/test.dir/test.c.i
|
||||
|
||||
CMakeFiles/test.dir/test.c.s: cmake_force
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/test.dir/test.c.s"
|
||||
/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /global/projects/villas/node/lib/nodes/go/test/test.c -o CMakeFiles/test.dir/test.c.s
|
||||
|
||||
# Object files for target test
|
||||
test_OBJECTS = \
|
||||
"CMakeFiles/test.dir/test.c.o"
|
||||
|
||||
# External object files for target test
|
||||
test_EXTERNAL_OBJECTS =
|
||||
|
||||
test: CMakeFiles/test.dir/test.c.o
|
||||
test: CMakeFiles/test.dir/build.make
|
||||
test: go/test.so
|
||||
test: CMakeFiles/test.dir/link.txt
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C executable test"
|
||||
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/test.dir/link.txt --verbose=$(VERBOSE)
|
||||
|
||||
# Rule to build all files generated by this target.
|
||||
CMakeFiles/test.dir/build: test
|
||||
|
||||
.PHONY : CMakeFiles/test.dir/build
|
||||
|
||||
CMakeFiles/test.dir/clean:
|
||||
$(CMAKE_COMMAND) -P CMakeFiles/test.dir/cmake_clean.cmake
|
||||
.PHONY : CMakeFiles/test.dir/clean
|
||||
|
||||
CMakeFiles/test.dir/depend:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /global/projects/villas/node/lib/nodes/go/test /global/projects/villas/node/lib/nodes/go/test /global/projects/villas/node/lib/nodes/go/test/build /global/projects/villas/node/lib/nodes/go/test/build /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles/test.dir/DependInfo.cmake --color=$(COLOR)
|
||||
.PHONY : CMakeFiles/test.dir/depend
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
file(REMOVE_RECURSE
|
||||
"CMakeFiles/test.dir/test.c.o"
|
||||
"test"
|
||||
"test.pdb"
|
||||
)
|
||||
|
||||
# Per-language clean rules from dependency scanning.
|
||||
foreach(lang C)
|
||||
include(CMakeFiles/test.dir/cmake_clean_${lang}.cmake OPTIONAL)
|
||||
endforeach()
|
|
@ -1,6 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
CMakeFiles/test.dir/test.c.o
|
||||
/global/projects/villas/node/lib/nodes/go/test/test.c
|
||||
go/test.h
|
|
@ -1,6 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
CMakeFiles/test.dir/test.c.o: ../test.c
|
||||
CMakeFiles/test.dir/test.c.o: go/test.h
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# compile C with /usr/bin/cc
|
||||
C_DEFINES =
|
||||
|
||||
C_INCLUDES = -isystem /global/projects/villas/node/lib/nodes/go/test/build/go
|
||||
|
||||
C_FLAGS =
|
||||
|
|
@ -1 +0,0 @@
|
|||
/usr/bin/cc -rdynamic CMakeFiles/test.dir/test.c.o -o test go/test.so -lpthread
|
|
@ -1,3 +0,0 @@
|
|||
CMAKE_PROGRESS_1 = 2
|
||||
CMAKE_PROGRESS_2 = 3
|
||||
|
Binary file not shown.
|
@ -1,211 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /global/projects/villas/node/lib/nodes/go/test
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /global/projects/villas/node/lib/nodes/go/test/build
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
||||
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles /global/projects/villas/node/lib/nodes/go/test/build//CMakeFiles/progress.marks
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named test
|
||||
|
||||
# Build rule for target.
|
||||
test: cmake_check_build_system
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 test
|
||||
.PHONY : test
|
||||
|
||||
# fast build rule for target.
|
||||
test/fast:
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/build
|
||||
.PHONY : test/fast
|
||||
|
||||
#=============================================================================
|
||||
# Target rules for targets named shim_go
|
||||
|
||||
# Build rule for target.
|
||||
shim_go: cmake_check_build_system
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 shim_go
|
||||
.PHONY : shim_go
|
||||
|
||||
# fast build rule for target.
|
||||
shim_go/fast:
|
||||
$(MAKE) $(MAKESILENT) -f go/CMakeFiles/shim_go.dir/build.make go/CMakeFiles/shim_go.dir/build
|
||||
.PHONY : shim_go/fast
|
||||
|
||||
test.o: test.c.o
|
||||
|
||||
.PHONY : test.o
|
||||
|
||||
# target to build an object file
|
||||
test.c.o:
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/test.c.o
|
||||
.PHONY : test.c.o
|
||||
|
||||
test.i: test.c.i
|
||||
|
||||
.PHONY : test.i
|
||||
|
||||
# target to preprocess a source file
|
||||
test.c.i:
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/test.c.i
|
||||
.PHONY : test.c.i
|
||||
|
||||
test.s: test.c.s
|
||||
|
||||
.PHONY : test.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
test.c.s:
|
||||
$(MAKE) $(MAKESILENT) -f CMakeFiles/test.dir/build.make CMakeFiles/test.dir/test.c.s
|
||||
.PHONY : test.c.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... shim_go"
|
||||
@echo "... test"
|
||||
@echo "... test.o"
|
||||
@echo "... test.i"
|
||||
@echo "... test.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
# Install script for directory: /global/projects/villas/node/lib/nodes/go/test
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set default install directory permissions.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
# Include the install script for each subdirectory.
|
||||
include("/global/projects/villas/node/lib/nodes/go/test/build/go/cmake_install.cmake")
|
||||
|
||||
endif()
|
||||
|
||||
if(CMAKE_INSTALL_COMPONENT)
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
|
||||
else()
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
file(WRITE "/global/projects/villas/node/lib/nodes/go/test/build/${CMAKE_INSTALL_MANIFEST}"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
|
@ -1,16 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# Relative path conversion top directories.
|
||||
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/global/projects/villas/node/lib/nodes/go/test")
|
||||
set(CMAKE_RELATIVE_PATH_TOP_BINARY "/global/projects/villas/node/lib/nodes/go/test/build")
|
||||
|
||||
# Force unix paths in dependencies.
|
||||
set(CMAKE_FORCE_UNIX_PATHS 1)
|
||||
|
||||
|
||||
# The C and CXX include file regular expressions for this directory.
|
||||
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
|
||||
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
|
||||
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
|
||||
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
|
|
@ -1 +0,0 @@
|
|||
0
|
|
@ -1,11 +0,0 @@
|
|||
# The set of languages for which implicit dependencies are needed:
|
||||
set(CMAKE_DEPENDS_LANGUAGES
|
||||
)
|
||||
# The set of files for implicit dependencies of each language:
|
||||
|
||||
# Targets to which this target links.
|
||||
set(CMAKE_TARGET_LINKED_INFO_FILES
|
||||
)
|
||||
|
||||
# Fortran module output directory.
|
||||
set(CMAKE_Fortran_TARGET_MODULE_DIR "")
|
|
@ -1,100 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# Delete rule output on recipe failure.
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /global/projects/villas/node/lib/nodes/go/test
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /global/projects/villas/node/lib/nodes/go/test/build
|
||||
|
||||
# Utility rule file for shim_go.
|
||||
|
||||
# Include the progress variables for this target.
|
||||
include go/CMakeFiles/shim_go.dir/progress.make
|
||||
|
||||
go/CMakeFiles/shim_go: go/test.so
|
||||
|
||||
|
||||
go/test.so: ../go/test.go
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building Go library"
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/go && env GOPATH= go build -buildmode=c-archive -o /global/projects/villas/node/lib/nodes/go/test/build/go/test.so ./...
|
||||
|
||||
shim_go: go/CMakeFiles/shim_go
|
||||
shim_go: go/test.so
|
||||
shim_go: go/CMakeFiles/shim_go.dir/build.make
|
||||
|
||||
.PHONY : shim_go
|
||||
|
||||
# Rule to build all files generated by this target.
|
||||
go/CMakeFiles/shim_go.dir/build: shim_go
|
||||
|
||||
.PHONY : go/CMakeFiles/shim_go.dir/build
|
||||
|
||||
go/CMakeFiles/shim_go.dir/clean:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build/go && $(CMAKE_COMMAND) -P CMakeFiles/shim_go.dir/cmake_clean.cmake
|
||||
.PHONY : go/CMakeFiles/shim_go.dir/clean
|
||||
|
||||
go/CMakeFiles/shim_go.dir/depend:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /global/projects/villas/node/lib/nodes/go/test /global/projects/villas/node/lib/nodes/go/test/go /global/projects/villas/node/lib/nodes/go/test/build /global/projects/villas/node/lib/nodes/go/test/build/go /global/projects/villas/node/lib/nodes/go/test/build/go/CMakeFiles/shim_go.dir/DependInfo.cmake --color=$(COLOR)
|
||||
.PHONY : go/CMakeFiles/shim_go.dir/depend
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
file(REMOVE_RECURSE
|
||||
"CMakeFiles/shim_go"
|
||||
"test.so"
|
||||
)
|
||||
|
||||
# Per-language clean rules from dependency scanning.
|
||||
foreach(lang )
|
||||
include(CMakeFiles/shim_go.dir/cmake_clean_${lang}.cmake OPTIONAL)
|
||||
endforeach()
|
|
@ -1,3 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
CMAKE_PROGRESS_1 = 1
|
||||
|
|
@ -1,169 +0,0 @@
|
|||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 3.18
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /global/projects/villas/node/lib/nodes/go/test
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /global/projects/villas/node/lib/nodes/go/test/build
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
|
||||
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles /global/projects/villas/node/lib/nodes/go/test/build/go//CMakeFiles/progress.marks
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 go/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /global/projects/villas/node/lib/nodes/go/test/build/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 go/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 go/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 go/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
go/CMakeFiles/shim_go.dir/rule:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 go/CMakeFiles/shim_go.dir/rule
|
||||
.PHONY : go/CMakeFiles/shim_go.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
shim_go: go/CMakeFiles/shim_go.dir/rule
|
||||
|
||||
.PHONY : shim_go
|
||||
|
||||
# fast build rule for target.
|
||||
shim_go/fast:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(MAKE) $(MAKESILENT) -f go/CMakeFiles/shim_go.dir/build.make go/CMakeFiles/shim_go.dir/build
|
||||
.PHONY : shim_go/fast
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... shim_go"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /global/projects/villas/node/lib/nodes/go/test/build && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Install script for directory: /global/projects/villas/node/lib/nodes/go/test/go
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set default install directory permissions.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
/* Code generated by cmd/cgo; DO NOT EDIT. */
|
||||
|
||||
/* package git.rwth-aachen.de/acs/public/villas/node */
|
||||
|
||||
|
||||
#line 1 "cgo-builtin-export-prolog"
|
||||
|
||||
#include <stddef.h> /* for ptrdiff_t below */
|
||||
|
||||
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
||||
#define GO_CGO_EXPORT_PROLOGUE_H
|
||||
|
||||
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
||||
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Start of preamble from import "C" comments. */
|
||||
|
||||
|
||||
#line 3 "test.go"
|
||||
|
||||
|
||||
|
||||
#line 1 "cgo-generated-wrapper"
|
||||
|
||||
|
||||
/* End of preamble from import "C" comments. */
|
||||
|
||||
|
||||
/* Start of boilerplate cgo prologue. */
|
||||
#line 1 "cgo-gcc-export-header-prolog"
|
||||
|
||||
#ifndef GO_CGO_PROLOGUE_H
|
||||
#define GO_CGO_PROLOGUE_H
|
||||
|
||||
typedef signed char GoInt8;
|
||||
typedef unsigned char GoUint8;
|
||||
typedef short GoInt16;
|
||||
typedef unsigned short GoUint16;
|
||||
typedef int GoInt32;
|
||||
typedef unsigned int GoUint32;
|
||||
typedef long long GoInt64;
|
||||
typedef unsigned long long GoUint64;
|
||||
typedef GoInt64 GoInt;
|
||||
typedef GoUint64 GoUint;
|
||||
typedef __SIZE_TYPE__ GoUintptr;
|
||||
typedef float GoFloat32;
|
||||
typedef double GoFloat64;
|
||||
typedef float _Complex GoComplex64;
|
||||
typedef double _Complex GoComplex128;
|
||||
|
||||
/*
|
||||
static assertion to make sure the file is being used on architecture
|
||||
at least with matching size of GoInt.
|
||||
*/
|
||||
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
||||
|
||||
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
||||
typedef _GoString_ GoString;
|
||||
#endif
|
||||
typedef void *GoMap;
|
||||
typedef void *GoChan;
|
||||
typedef struct { void *t; void *v; } GoInterface;
|
||||
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
||||
|
||||
#endif
|
||||
|
||||
/* End of boilerplate cgo prologue. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern GoInt TestBla(void* ptr);
|
||||
extern void* NewTest(GoInt number);
|
||||
extern void* NewTest2(GoInt number);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Binary file not shown.
Binary file not shown.
|
@ -1,23 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(test_go)
|
||||
|
||||
set(TARGET shim_go)
|
||||
|
||||
set(SRCS test.go)
|
||||
set(LIB test.so)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${LIB}
|
||||
DEPENDS ${SRCS}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND env GOPATH=${GOPATH} go build -buildmode=c-archive
|
||||
-o "${CMAKE_CURRENT_BINARY_DIR}/${LIB}"
|
||||
${CMAKE_GO_FLAGS} ./...
|
||||
COMMENT "Building Go library")
|
||||
|
||||
add_custom_target(${TARGET} DEPENDS ${LIB} ${HEADER})
|
||||
add_library(goshim STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(goshim ${TARGET})
|
||||
set_target_properties(goshim
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${LIB}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR})
|
|
@ -1,5 +0,0 @@
|
|||
module git.rwth-aachen.de/acs/public/villas/node
|
||||
|
||||
go 1.16
|
||||
|
||||
require github.com/mattn/go-pointer v0.0.1 // indirect
|
|
@ -1,2 +0,0 @@
|
|||
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
|
||||
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
|
|
@ -1,76 +0,0 @@
|
|||
package main
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
gopointer "github.com/mattn/go-pointer"
|
||||
)
|
||||
|
||||
type Bla interface {
|
||||
Bla() int
|
||||
}
|
||||
|
||||
type Test struct {
|
||||
Number int
|
||||
}
|
||||
|
||||
type Test2 struct {
|
||||
Number int
|
||||
}
|
||||
|
||||
type TestPtr unsafe.Pointer
|
||||
|
||||
func (t *Test) Bla() int {
|
||||
fmt.Printf("Hello World: %d\n", t.Number)
|
||||
|
||||
t.Number++
|
||||
|
||||
return t.Number
|
||||
}
|
||||
|
||||
func (t *Test2) Bla() int {
|
||||
fmt.Printf("Hello World: %d\n", t.Number)
|
||||
|
||||
t.Number++
|
||||
t.Number++
|
||||
|
||||
return t.Number
|
||||
}
|
||||
|
||||
//export TestBla
|
||||
func TestBla(ptr unsafe.Pointer) int {
|
||||
t := gopointer.Restore(ptr).(Bla)
|
||||
return t.Bla()
|
||||
}
|
||||
|
||||
//export NewTest
|
||||
func NewTest(number int) unsafe.Pointer {
|
||||
t := &Test{
|
||||
Number: number,
|
||||
}
|
||||
|
||||
ptr := gopointer.Save(t)
|
||||
|
||||
return ptr
|
||||
}
|
||||
|
||||
//export NewTest2
|
||||
func NewTest2(number int) unsafe.Pointer {
|
||||
t := &Test2{
|
||||
Number: number,
|
||||
}
|
||||
|
||||
ptr := gopointer.Save(t)
|
||||
|
||||
return ptr
|
||||
}
|
||||
|
||||
func main() {
|
||||
// We need the main function to make possible
|
||||
// CGO compiler to compile the package as C shared library
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#include "test.h"
|
||||
|
||||
int main() {
|
||||
void *ptr = NewTest2(55);
|
||||
|
||||
TestBla(ptr);
|
||||
TestBla(ptr);
|
||||
TestBla(ptr);
|
||||
int r = TestBla(ptr);
|
||||
|
||||
printf("final %d\n", r);
|
||||
}
|
Loading…
Add table
Reference in a new issue