This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/H/CMakeLists.txt
Vitor Santos Costa 54234c7e1d fix C major issues
- use delays to implement setup_call
- fix user_* flag
- error handling i CXX should b local
- fix mess on  how to call openQuert
- deter pt -> from a pointer to another one
- avoid text forms when you can use C: LOCLS to locals.h
- fux seto_call
- new gated call
- mem streams
2017-08-21 12:29:58 +01:00

21 lines
736 B
CMake

file( STRINGS locals.h tmp )
if (WITH_THREADS)
Foreach(i ${tmp})
string(REGEX REPLACE "^LOCAL[^(]*[(][^,]+,[^_a-zA-Z0-9]*([_a-zA-Z0-9]+)[^_a-zA-Z0-9,]*,[^_a-zA-Z0-9]*([_a-zA-Z0-9]+)[^)]*.*$" "#define LOCAL_\\0 (Yap_regs.worker_local->\\1)\\n#define REMOTE_\\1(wid) (REMOTE(wid)->\\1)\\n" i2 ${i})
list( APPEND tmp2 ${i2} "\n")
endforeach()
else()
Foreach(i ${tmp})
string(REGEX REPLACE "^LOCAL[^(]*[(][ \t]*([^,]+)[ \t]*,[ \t]*([^),]+).*" "#define LOCAL_\\2 (Yap_local.\\2)\\n#define REMOTE_\\2(wid) (REMOTE(wid)->\\2)\\n" i2 ${i})
list( APPEND tmp2 ${i2} "\n")
endforeach()
endif()
file( WRITE ${CMAKE_TOP_BINARY_DIR}/dlocals.h ${tmp2})
install (FILES ${PL_SOURCES}
DESTINATION ${libpl}/pl
)